From 159871a2b5fb24bae7d5b830b6e9f39e75405591 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 17 Sep 2020 11:14:19 -0700 Subject: [PATCH] feat!: initial library generation (#8) --- .eslintignore | 3 +- .eslintrc.json | 3 + .eslintrc.yml | 15 - .gitattributes | 4 + .github/ISSUE_TEMPLATE/bug_report.md | 11 +- .github/workflows/ci.yaml | 57 + .gitignore | 1 - .jsdoc.js | 17 +- .kokoro/.gitattributes | 1 + .../continuous/{node10 => node12}/lint.cfg | 0 .../{node10 => node12}/samples-test.cfg | 0 .../{node10 => node12}/system-test.cfg | 0 .kokoro/continuous/node8/common.cfg | 24 - .kokoro/continuous/node8/test.cfg | 0 .kokoro/populate-secrets.sh | 43 + .kokoro/presubmit/node10/docs.cfg | 4 - .kokoro/presubmit/node10/lint.cfg | 4 - .kokoro/presubmit/node10/test.cfg | 0 .../{node10 => node12}/samples-test.cfg | 0 .../{node10 => node12}/system-test.cfg | 0 .kokoro/presubmit/node8/common.cfg | 24 - .kokoro/presubmit/node8/test.cfg | 0 .kokoro/presubmit/windows/common.cfg | 2 - .kokoro/presubmit/windows/test.cfg | 2 - .kokoro/publish.sh | 2 +- .kokoro/release/docs-devsite.cfg | 26 + .kokoro/release/docs-devsite.sh | 67 + .kokoro/release/publish.cfg | 12 +- .kokoro/samples-test.sh | 11 + .kokoro/system-test.sh | 12 + .kokoro/test.bat | 14 +- .kokoro/test.sh | 11 + .kokoro/trampoline.sh | 1 + .mocharc.js | 29 + .prettierignore | 9 +- .prettierrc.js | 17 + README.md | 67 +- api-extractor.json | 369 ++ linkinator.config.json | 12 +- package.json | 60 +- package.json.back | 46 - .../executions/v1beta/executions.proto | 252 + .../cloud/workflows/v1beta/workflows.proto | 314 ++ protos/protos.d.ts | 1354 ++++- protos/protos.js | 3823 +++++++++---- protos/protos.json | 343 +- samples/README.md | 68 + samples/create-execution.js | 41 + samples/package.json | 22 + samples/quickstart.js | 42 + samples/test/create-execution.js | 40 + samples/test/quickstart.js | 35 + src/index.ts | 15 +- src/v1alpha1/workflows_client.ts | 897 ---- src/v1alpha1/workflows_proto_list.json | 3 - src/v1beta/executions_client.ts | 979 ++++ src/v1beta/executions_client_config.json | 42 + src/v1beta/executions_proto_list.json | 3 + src/{v1alpha1 => v1beta}/index.ts | 3 +- src/v1beta/workflows_client.ts | 1230 +++++ .../workflows_client_config.json | 2 +- src/v1beta/workflows_proto_list.json | 3 + synth.metadata | 4744 +---------------- synth.py | 39 +- system-test/fixtures/sample/src/index.js | 7 +- system-test/fixtures/sample/src/index.ts | 6 +- system-test/install.ts | 6 +- test/gapic-v1alpha1.js | 440 -- test/gapic-workflows-v1alpha1.ts | 395 -- test/gapic_executions_v1beta.ts | 994 ++++ test/gapic_workflows_v1beta.ts | 1361 +++++ tsconfig.json | 2 +- webpack.config.js | 14 +- 73 files changed, 10649 insertions(+), 7850 deletions(-) create mode 100644 .eslintrc.json delete mode 100644 .eslintrc.yml create mode 100644 .gitattributes create mode 100644 .github/workflows/ci.yaml create mode 100644 .kokoro/.gitattributes rename .kokoro/continuous/{node10 => node12}/lint.cfg (100%) rename .kokoro/continuous/{node10 => node12}/samples-test.cfg (100%) rename .kokoro/continuous/{node10 => node12}/system-test.cfg (100%) delete mode 100644 .kokoro/continuous/node8/common.cfg delete mode 100644 .kokoro/continuous/node8/test.cfg create mode 100755 .kokoro/populate-secrets.sh delete mode 100644 .kokoro/presubmit/node10/docs.cfg delete mode 100644 .kokoro/presubmit/node10/lint.cfg delete mode 100644 .kokoro/presubmit/node10/test.cfg rename .kokoro/presubmit/{node10 => node12}/samples-test.cfg (100%) rename .kokoro/presubmit/{node10 => node12}/system-test.cfg (100%) delete mode 100644 .kokoro/presubmit/node8/common.cfg delete mode 100644 .kokoro/presubmit/node8/test.cfg delete mode 100644 .kokoro/presubmit/windows/common.cfg delete mode 100644 .kokoro/presubmit/windows/test.cfg create mode 100644 .kokoro/release/docs-devsite.cfg create mode 100755 .kokoro/release/docs-devsite.sh create mode 100644 .mocharc.js create mode 100644 .prettierrc.js create mode 100644 api-extractor.json delete mode 100644 package.json.back create mode 100644 protos/google/cloud/workflows/executions/v1beta/executions.proto create mode 100644 protos/google/cloud/workflows/v1beta/workflows.proto create mode 100644 samples/README.md create mode 100644 samples/create-execution.js create mode 100644 samples/package.json create mode 100644 samples/quickstart.js create mode 100644 samples/test/create-execution.js create mode 100644 samples/test/quickstart.js delete mode 100644 src/v1alpha1/workflows_client.ts delete mode 100644 src/v1alpha1/workflows_proto_list.json create mode 100644 src/v1beta/executions_client.ts create mode 100644 src/v1beta/executions_client_config.json create mode 100644 src/v1beta/executions_proto_list.json rename src/{v1alpha1 => v1beta}/index.ts (90%) create mode 100644 src/v1beta/workflows_client.ts rename src/{v1alpha1 => v1beta}/workflows_client_config.json (95%) create mode 100644 src/v1beta/workflows_proto_list.json delete mode 100644 test/gapic-v1alpha1.js delete mode 100644 test/gapic-workflows-v1alpha1.ts create mode 100644 test/gapic_executions_v1beta.ts create mode 100644 test/gapic_workflows_v1beta.ts diff --git a/.eslintignore b/.eslintignore index 09b31fe..9340ad9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..7821534 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 73eeec2..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -extends: - - 'eslint:recommended' - - 'plugin:node/recommended' - - prettier -plugins: - - node - - prettier -rules: - prettier/prettier: error - block-scoped-var: error - eqeqeq: error - no-warning-comments: warn - no-var: error - prefer-const: error diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..33739cb --- /dev/null +++ b/.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/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9a14b12..081cf75 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,13 +8,18 @@ Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. -Please run down the following list and make sure you've tried the usual "quick fixes": +1) Is this a client library issue or a product issue? +This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers. +2) Did someone already solve this? - Search the issues already opened: https://github.com/googleapis/nodejs-workflows/issues - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js + - Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js -If you are still having issues, please be sure to include as much information as possible: +3) Do you have a support contract? +Please create an issue in the [support console](https://cloud.google.com/support/) to ensure a timely response. + +If the support paths suggested above still do not result in a resolution, please provide the following details. #### Environment details diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7dd110e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,57 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node: [10, 12, 13] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: node --version + - run: npm install --engine-strict + - run: npm test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{ matrix.node }} + fail_ci_if_error: false + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions windows + fail_ci_if_error: false + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm run lint + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm run docs-test diff --git a/.gitignore b/.gitignore index e1a7662..5d32b23 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ - diff --git a/.jsdoc.js b/.jsdoc.js index 24ea450..ec1d3c4 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,6 +12,9 @@ // 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'; @@ -31,16 +34,20 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2018 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, - systemName: '@google-cloud/workflows', - theme: 'lumen' + systemName: 'workflows', + theme: 'lumen', + default: { + outputSourceFiles: false + } }, markdown: { idInHeadings: true diff --git a/.kokoro/.gitattributes b/.kokoro/.gitattributes new file mode 100644 index 0000000..87acd4f --- /dev/null +++ b/.kokoro/.gitattributes @@ -0,0 +1 @@ +* linguist-generated=true diff --git a/.kokoro/continuous/node10/lint.cfg b/.kokoro/continuous/node12/lint.cfg similarity index 100% rename from .kokoro/continuous/node10/lint.cfg rename to .kokoro/continuous/node12/lint.cfg diff --git a/.kokoro/continuous/node10/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg similarity index 100% rename from .kokoro/continuous/node10/samples-test.cfg rename to .kokoro/continuous/node12/samples-test.cfg diff --git a/.kokoro/continuous/node10/system-test.cfg b/.kokoro/continuous/node12/system-test.cfg similarity index 100% rename from .kokoro/continuous/node10/system-test.cfg rename to .kokoro/continuous/node12/system-test.cfg diff --git a/.kokoro/continuous/node8/common.cfg b/.kokoro/continuous/node8/common.cfg deleted file mode 100644 index 00a1c2c..0000000 --- a/.kokoro/continuous/node8/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-workflows/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-workflows/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node8/test.cfg b/.kokoro/continuous/node8/test.cfg deleted file mode 100644 index e69de29..0000000 diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 0000000..6f9d228 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 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. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret $key > \ + "$SECRET_LOCATION/$key" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/node10/docs.cfg b/.kokoro/presubmit/node10/docs.cfg deleted file mode 100644 index a66c873..0000000 --- a/.kokoro/presubmit/node10/docs.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-workflows/.kokoro/docs.sh" -} diff --git a/.kokoro/presubmit/node10/lint.cfg b/.kokoro/presubmit/node10/lint.cfg deleted file mode 100644 index d2aeae4..0000000 --- a/.kokoro/presubmit/node10/lint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-workflows/.kokoro/lint.sh" -} diff --git a/.kokoro/presubmit/node10/test.cfg b/.kokoro/presubmit/node10/test.cfg deleted file mode 100644 index e69de29..0000000 diff --git a/.kokoro/presubmit/node10/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg similarity index 100% rename from .kokoro/presubmit/node10/samples-test.cfg rename to .kokoro/presubmit/node12/samples-test.cfg diff --git a/.kokoro/presubmit/node10/system-test.cfg b/.kokoro/presubmit/node12/system-test.cfg similarity index 100% rename from .kokoro/presubmit/node10/system-test.cfg rename to .kokoro/presubmit/node12/system-test.cfg diff --git a/.kokoro/presubmit/node8/common.cfg b/.kokoro/presubmit/node8/common.cfg deleted file mode 100644 index 00a1c2c..0000000 --- a/.kokoro/presubmit/node8/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-workflows/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-workflows/.kokoro/test.sh" -} diff --git a/.kokoro/presubmit/node8/test.cfg b/.kokoro/presubmit/node8/test.cfg deleted file mode 100644 index e69de29..0000000 diff --git a/.kokoro/presubmit/windows/common.cfg b/.kokoro/presubmit/windows/common.cfg deleted file mode 100644 index d6e25e0..0000000 --- a/.kokoro/presubmit/windows/common.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - diff --git a/.kokoro/presubmit/windows/test.cfg b/.kokoro/presubmit/windows/test.cfg deleted file mode 100644 index e3c619f..0000000 --- a/.kokoro/presubmit/windows/test.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# Use the test file directly -build_file: "nodejs-workflows/.kokoro/test.bat" diff --git a/.kokoro/publish.sh b/.kokoro/publish.sh index 6e56d3e..f056d86 100755 --- a/.kokoro/publish.sh +++ b/.kokoro/publish.sh @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / cd $(dirname $0)/.. -NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-workflows-npm-token) +NPM_TOKEN=$(cat $KOKORO_GFILE_DIR/secret_manager/npm_publish_token) echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm install diff --git a/.kokoro/release/docs-devsite.cfg b/.kokoro/release/docs-devsite.cfg new file mode 100644 index 0000000..f2453ec --- /dev/null +++ b/.kokoro/release/docs-devsite.cfg @@ -0,0 +1,26 @@ +# service account used to publish up-to-date docs. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# doc publications use a Python image. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "nodejs-workflows/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/nodejs-workflows/.kokoro/release/docs-devsite.sh" +} diff --git a/.kokoro/release/docs-devsite.sh b/.kokoro/release/docs-devsite.sh new file mode 100755 index 0000000..fa089cf --- /dev/null +++ b/.kokoro/release/docs-devsite.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +# 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 +# +# 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. + +set -eo pipefail + +# build jsdocs (Python is installed on the Node 10 docker image). +if [[ -z "$CREDENTIALS" ]]; then + # if CREDENTIALS are explicitly set, assume we're testing locally + # and don't set NPM_CONFIG_PREFIX. + export NPM_CONFIG_PREFIX=/home/node/.npm-global + export PATH="$PATH:/home/node/.npm-global/bin" + cd $(dirname $0)/../.. +fi + +mkdir ./etc + +npm install +npm run api-extractor +npm run api-documenter + +npm i json@9.0.6 -g +NAME=$(cat .repo-metadata.json | json name) + +mkdir ./_devsite +cp ./yaml/$NAME/* ./_devsite + +# Delete SharePoint item, see https://github.com/microsoft/rushstack/issues/1229 +sed -i -e '1,3d' ./yaml/toc.yml +sed -i -e 's/^ //' ./yaml/toc.yml + +cp ./yaml/toc.yml ./_devsite/toc.yml + +# create docs.metadata, based on package.json and .repo-metadata.json. +pip install -U pip +python3 -m pip install --user gcp-docuploader +python3 -m docuploader create-metadata \ + --name=$NAME \ + --version=$(cat package.json | json version) \ + --language=$(cat .repo-metadata.json | json language) \ + --distribution-name=$(cat .repo-metadata.json | json distribution_name) \ + --product-page=$(cat .repo-metadata.json | json product_documentation) \ + --github-repository=$(cat .repo-metadata.json | json repo) \ + --issue-tracker=$(cat .repo-metadata.json | json issue_tracker) +cp docs.metadata ./_devsite/docs.metadata + +# deploy the docs. +if [[ -z "$CREDENTIALS" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi +if [[ -z "$BUCKET" ]]; then + BUCKET=docs-staging-v2-staging +fi + +python3 -m docuploader upload ./_devsite --destination-prefix docfx --credentials $CREDENTIALS --staging-bucket $BUCKET diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index 5ecc65a..7f1f79c 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -47,13 +47,9 @@ before_action { } } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google-cloud-workflows-npm-token" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "npm_publish_token,releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } # Download trampoline resources. @@ -65,7 +61,7 @@ build_file: "nodejs-workflows/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" } env_vars: { diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 20e3241..c0c4013 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -39,6 +39,17 @@ if [ -f samples/package.json ]; then npm link ../ npm install cd .. + # If tests are running against master, configure Build Cop + # to open issues on failures: + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP + fi npm run samples-test fi diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index fc5824e..283f170 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -33,6 +33,18 @@ fi npm install +# If tests are running against master, configure Build Cop +# to open issues on failures: +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP +fi + npm run system-test # codecov combines coverage across integration and unit tests. Include diff --git a/.kokoro/test.bat b/.kokoro/test.bat index fddff75..ae59e59 100644 --- a/.kokoro/test.bat +++ b/.kokoro/test.bat @@ -17,14 +17,12 @@ cd /d %~dp0 cd .. -@rem The image we're currently running has a broken version of Node.js enabled -@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional -@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to -@rem install npm for v10.15.3. -call nvm use v8.9.1 || goto :error -call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error -call nvm use v10.15.3 || goto :error -call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error +@rem npm path is not currently set in our image, we should fix this next time +@rem we upgrade Node.js in the image: +SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm + +call nvm use v12.14.1 +call which node call npm install || goto :error call npm run test || goto :error diff --git a/.kokoro/test.sh b/.kokoro/test.sh index 9db11bb..47be59b 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -21,6 +21,17 @@ export NPM_CONFIG_PREFIX=/home/node/.npm-global cd $(dirname $0)/.. npm install +# If tests are running against master, configure Build Cop +# to open issues on failures: +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then + export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml + export MOCHA_REPORTER=xunit + cleanup() { + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + } + trap cleanup EXIT HUP +fi npm test # codecov combines coverage across integration and unit tests. Include diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index 9bd4905..a4241db 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -24,4 +24,5 @@ function cleanup() { } trap cleanup EXIT +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.mocharc.js b/.mocharc.js new file mode 100644 index 0000000..0b60050 --- /dev/null +++ b/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 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/.prettierignore b/.prettierignore index f6fac98..9340ad9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..d1b9510 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 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/README.md b/README.md index c759b2f..27f92c2 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ Workflows client for Node.js +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-workflows/blob/master/CHANGELOG.md). + * [Workflows Node.js Client API Reference][client-docs] * [Workflows Documentation][product-docs] * [github.com/googleapis/nodejs-workflows](https://github.com/googleapis/nodejs-workflows) @@ -29,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [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) @@ -52,12 +55,66 @@ npm install @google-cloud/workflows ``` +### Using the client library + +```javascript +/** + * TODO(developer): Uncomment these variables before running the sample. + */ +// const projectId = 'my-project'; +// const location = 'us-central1'; +const {WorkflowsClient} = require('@google-cloud/workflows'); +const client = new WorkflowsClient(); +async function listWorkflows() { + const [workflows] = await client.listWorkflows({ + parent: client.locationPath(projectId, location), + }); + for (const workflow of workflows) { + console.info(`name: ${workflow.name}`); + } +} +listWorkflows(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-workflows/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Create-execution | [source code](https://github.com/googleapis/nodejs-workflows/blob/master/samples/create-execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-workflows&page=editor&open_in_editor=samples/create-execution.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-workflows/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-workflows&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | The [Workflows 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. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + ## Versioning This library follows [Semantic Versioning](http://semver.org/). @@ -79,6 +136,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-workflows/blob/master/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 template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + ## License Apache Version 2.0 diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 0000000..de22829 --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/linkinator.config.json b/linkinator.config.json index d780d6b..6ed9fe2 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -2,6 +2,14 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" - ] + "www.googleapis.com", + "img.shields.io", + "googleapis.dev/nodejs/workflows/latest/index.html", + "github.com/googleapis/nodejs-workflows/blob/master/CHANGELOG.md", + "github.com/googleapis/nodejs-workflows/blob/master/samples/create-execution.js", + "github.com/googleapis/nodejs-workflows/blob/master/samples/quickstart.js", + "googleapis/nodejs-workflows/tree/master/samples" + ], + "silent": true, + "concurrency": 10 } diff --git a/package.json b/package.json index 6bcbceb..007d4ee 100644 --- a/package.json +++ b/package.json @@ -1,49 +1,67 @@ { "name": "@google-cloud/workflows", - "version": "0.2.0", + "version": "0.1.0", "description": "Workflows client for Node.js", "repository": "googleapis/nodejs-workflows", "license": "Apache-2.0", "author": "Google LLC", + "main": "build/src/index.js", "files": [ "build/src", "build/protos" ], - "main": "build/src/index.js", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google workflows", + "workflows", + "workflows" + ], "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", - "predocs-test": "npm run docs", + "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" + "system-test": "c8 mocha --exit build/system-test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "test": "c8 mocha build/test", + "pretest": "npm run prepare" }, "dependencies": { - "google-gax": "^1.12.0" + "google-gax": "^2.7.0" }, "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", + "@types/mocha": "^8.0.3", + "@types/node": "^14.6.1", + "@types/sinon": "^9.0.5", + "c8": "^7.3.0", + "gts": "^2.0.2", + "jsdoc": "^3.6.5", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.4", + "linkinator": "^2.1.2", + "mocha": "^8.1.2", + "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" + "sinon": "^9.0.3", + "ts-loader": "^8.0.3", + "typescript": "^3.9.7", + "webpack": "^4.44.1", + "webpack-cli": "^3.3.12" }, "engines": { - "node": ">=8.13.0" + "node": ">=10.0.0" } } diff --git a/package.json.back b/package.json.back deleted file mode 100644 index cf7e9a1..0000000 --- a/package.json.back +++ /dev/null @@ -1,46 +0,0 @@ -{ - "repository": "GoogleCloudPlatform/google-cloud-node", - "name": "@google-cloud/workflows", - "version": "0.1.0", - "author": "Google LLC", - "description": "Workflows API client for Node.js", - "main": "src/index.js", - "browser": "src/browser.js", - "files": [ - "protos", - "src", - "AUTHORS", - "COPYING" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google workflows", - "workflows", - "Workflows API" - ], - "dependencies": { - "google-gax": "^1.5.0" - }, - "devDependencies": { - "mocha": "^5.2.0", - "null-loader": "^3.0.0", - "webpack": "^4.37.0", - "webpack-cli": "^3.3.6" - }, - "scripts": { - "compile-protos": "compileProtos ./src", - "smoke-test": "mocha smoke-test/*.js --timeout 5000", - "test": "mocha test/*.js" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=8.10.0" - } -} diff --git a/protos/google/cloud/workflows/executions/v1beta/executions.proto b/protos/google/cloud/workflows/executions/v1beta/executions.proto new file mode 100644 index 0000000..5b03fdf --- /dev/null +++ b/protos/google/cloud/workflows/executions/v1beta/executions.proto @@ -0,0 +1,252 @@ +// Copyright 2020 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.workflows.executions.v1beta; + +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 go_package = "google.golang.org/genproto/googleapis/cloud/workflows/executions/v1beta;executions"; +option java_multiple_files = true; +option java_outer_classname = "ExecutionsProto"; +option java_package = "com.google.cloud.workflows.executions.v1beta"; +option (google.api.resource_definition) = { + type: "workflows.googleapis.com/Workflow" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}" +}; + +// Executions is used to start and manage running instances of +// [Workflows][google.cloud.workflows.v1beta.Workflow] called executions. +service Executions { + option (google.api.default_host) = "workflowexecutions.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Returns a list of executions which belong to the workflow with + // the given name. The method returns executions of all workflow + // revisions. Returned executions are ordered by their start time (newest + // first). + rpc ListExecutions(ListExecutionsRequest) returns (ListExecutionsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/workflows/*}/executions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new execution using the latest revision of the given workflow. + rpc CreateExecution(CreateExecutionRequest) returns (Execution) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/workflows/*}/executions" + body: "execution" + }; + option (google.api.method_signature) = "parent,execution"; + } + + // Returns an execution of the given name. + rpc GetExecution(GetExecutionRequest) returns (Execution) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancels an execution of the given name. + rpc CancelExecution(CancelExecutionRequest) returns (Execution) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// A running instance of a [Workflow][google.cloud.workflows.v1beta.Workflow]. +message Execution { + option (google.api.resource) = { + type: "workflowexecutions.googleapis.com/Execution" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}" + }; + + // Error describes why the execution was abnormally terminated. + message Error { + // Error payload returned by the execution, represented as a JSON string. + string payload = 1; + + // Human readable error context, helpful for debugging purposes. + string context = 2; + } + + // Describes the current state of the execution. More states may be added + // in the future. + enum State { + // Invalid state. + STATE_UNSPECIFIED = 0; + + // The execution is in progress. + ACTIVE = 1; + + // The execution finished successfully. + SUCCEEDED = 2; + + // The execution failed with an error. + FAILED = 3; + + // The execution was stopped intentionally. + CANCELLED = 4; + } + + // Output only. The resource name of the execution. + // Format: + // projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Marks the beginning of execution. + google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Marks the end of execution, successful or not. + google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the execution. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input parameters of the execution represented as a JSON string. + // The size limit is 32KB. + string argument = 5; + + // Output only. Output of the execution represented as a JSON string. The + // value can only be present if the execution's state is `SUCCEEDED`. + string result = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error which caused the execution to finish prematurely. + // The value is only present if the execution's state is `FAILED` + // or `CANCELLED`. + Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision of the workflow this execution is using. + string workflow_revision_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for the +// [ListExecutions][google.cloud.workflows.executions.v1beta.Executions.ListExecutions] +// method. +message ListExecutionsRequest { + // Required. Name of the workflow for which the executions should be listed. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; + + // Maximum number of executions to return per call. + // Max supported value depends on the selected Execution view: it's 10000 for + // BASIC and 100 for FULL. The default value used if the field is not + // specified is 100, regardless of the selected view. Values greater than + // the max value will be coerced down to it. + int32 page_size = 2; + + // A page token, received from a previous `ListExecutions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListExecutions` must + // match the call that provided the page token. + string page_token = 3; + + // Optional. A view defining which fields should be filled in the returned executions. + // The API will default to the BASIC view. + ExecutionView view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the +// [ListExecutions][google.cloud.workflows.executions.v1beta.Executions.ListExecutions] +// method. +message ListExecutionsResponse { + // The executions which match the request. + repeated Execution executions = 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 the +// [CreateExecution][google.cloud.workflows.executions.v1beta.Executions.CreateExecution] +// method. +message CreateExecutionRequest { + // Required. Name of the workflow for which an execution should be created. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + // The latest revision of the workflow will be used. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; + + // Required. Execution to be created. + Execution execution = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the +// [GetExecution][google.cloud.workflows.executions.v1beta.Executions.GetExecution] +// method. +message GetExecutionRequest { + // Required. Name of the execution to be retrieved. + // Format: + // projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflowexecutions.googleapis.com/Execution" + } + ]; + + // Optional. A view defining which fields should be filled in the returned execution. + // The API will default to the FULL view. + ExecutionView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for the +// [CancelExecution][google.cloud.workflows.executions.v1beta.Executions.CancelExecution] +// method. +message CancelExecutionRequest { + // Required. Name of the execution to be cancelled. + // Format: + // projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflowexecutions.googleapis.com/Execution" + } + ]; +} + +// Defines possible views for execution resource. +enum ExecutionView { + // The default / unset value. + EXECUTION_VIEW_UNSPECIFIED = 0; + + // Includes only basic metadata about the execution. + // Following fields are returned: name, start_time, end_time, state + // and workflow_revision_id. + BASIC = 1; + + // Includes all data. + FULL = 2; +} diff --git a/protos/google/cloud/workflows/v1beta/workflows.proto b/protos/google/cloud/workflows/v1beta/workflows.proto new file mode 100644 index 0000000..5308fa7 --- /dev/null +++ b/protos/google/cloud/workflows/v1beta/workflows.proto @@ -0,0 +1,314 @@ +// Copyright 2020 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.workflows.v1beta; + +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/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/workflows/v1beta;workflows"; +option java_multiple_files = true; +option java_outer_classname = "WorkflowsProto"; +option java_package = "com.google.cloud.workflows.v1beta"; + +// Workflows is used to deploy and execute workflow programs. +// Workflows makes sure the program executes reliably, despite hardware and +// networking interruptions. +service Workflows { + option (google.api.default_host) = "workflows.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Workflows in a given project and location. + // The default order is not specified. + rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/workflows" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Workflow. + rpc GetWorkflow(GetWorkflowRequest) returns (Workflow) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new workflow. If a workflow with the specified name already + // exists in the specified project and location, the long running operation + // will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + rpc CreateWorkflow(CreateWorkflowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/workflows" + body: "workflow" + }; + option (google.api.method_signature) = "parent,workflow,workflow_id"; + option (google.longrunning.operation_info) = { + response_type: "Workflow" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a workflow with the specified name. + // This method also cancels and deletes all running executions of the + // workflow. + rpc DeleteWorkflow(DeleteWorkflowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates an existing workflow. + // Running this method has no impact on already running executions of the + // workflow. A new revision of the workflow may be created as a result of a + // successful update operation. In that case, such revision will be used + // in new workflow executions. + rpc UpdateWorkflow(UpdateWorkflowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{workflow.name=projects/*/locations/*/workflows/*}" + body: "workflow" + }; + option (google.api.method_signature) = "workflow,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Workflow" + metadata_type: "OperationMetadata" + }; + } +} + +// Workflow program to be executed by Workflows. +message Workflow { + option (google.api.resource) = { + type: "workflows.googleapis.com/Workflow" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}" + }; + + // Describes the current state of workflow deployment. More states may be + // added in the future. + enum State { + // Invalid state. + STATE_UNSPECIFIED = 0; + + // The workflow has been deployed successfully and is serving. + ACTIVE = 1; + } + + // The resource name of the workflow. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + string name = 1; + + // Description of the workflow provided by the user. + // Must be at most 1000 unicode characters long. + string description = 2; + + // Output only. State of the workflow deployment. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revision of the workflow. + // A new revision of a workflow is created as a result of updating the + // following fields of a workflow: + // - `source_code` + // - `service_account` + // The format is "000001-a4d", where the first 6 characters define + // the zero-padded revision ordinal number. They are followed by a hyphen and + // 3 hexadecimal random characters. + string revision_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of when the workflow was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the workflow. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp that the latest revision of the workflow + // was created. + google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this workflow. + // Labels can contain at most 64 entries. Keys and values can be no longer + // than 63 characters and can only contain lowercase letters, numeric + // characters, underscores and dashes. Label keys must start with a letter. + // International characters are allowed. + map labels = 8; + + // Name of the service account associated with the latest workflow version. + // This service account represents the identity of the workflow and determines + // what permissions the workflow has. + // Format: projects/{project}/serviceAccounts/{account} + // + // Using `-` as a wildcard for the `{project}` will infer the project from + // the account. The `{account}` value can be the `email` address or the + // `unique_id` of the service account. + // + // If not provided, workflow will use the project's default service account. + // Modifying this field for an existing workflow results in a new workflow + // revision. + string service_account = 9; + + // Required. Location of the workflow source code. + // Modifying this field for an existing workflow results in a new workflow + // revision. + oneof source_code { + // Workflow code to be executed. The size limit is 32KB. + string source_contents = 10; + } +} + +// Request for the +// [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows] +// method. +message ListWorkflowsRequest { + // Required. Project and location from which the workflows should be listed. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of workflows to return per call. The service may return + // fewer than this value. If the value is not specified, a default value of + // 500 will be used. The maximum permitted value is 1000 and values greater + // than 1000 will be coerced down to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListWorkflows` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflows` must + // match the call that provided the page token. + string page_token = 3; + + // Filter to restrict results to specific workflows. + string filter = 4; + + // Comma-separated list of fields that that specify the order of the results. + // Default sorting order for a field is ascending. To specify descending order + // for a field, append a " desc" suffix. + // If not specified, the results will be returned in an unspecified order. + string order_by = 5; +} + +// Response for the +// [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows] +// method. +message ListWorkflowsResponse { + // The workflows which match the request. + repeated Workflow workflows = 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; + + // Unreachable resources. + repeated string unreachable = 3; +} + +// Request for the +// [GetWorkflow][google.cloud.workflows.v1beta.Workflows.GetWorkflow] method. +message GetWorkflowRequest { + // Required. Name of the workflow which information should be retrieved. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; +} + +// Request for the +// [CreateWorkflow][google.cloud.workflows.v1beta.Workflows.CreateWorkflow] +// method. +message CreateWorkflowRequest { + // Required. Project and location in which the workflow should be created. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Workflow to be created. + Workflow workflow = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the workflow to be created. It has to fulfill the + // following requirements: + // + // * Must contain only letters, numbers, underscores and hyphens. + // * Must start with a letter. + // * Must be between 1-64 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project and location. + string workflow_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the +// [DeleteWorkflow][google.cloud.workflows.v1beta.Workflows.DeleteWorkflow] +// method. +message DeleteWorkflowRequest { + // Required. Name of the workflow to be deleted. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; +} + +// Request for the +// [UpdateWorkflow][google.cloud.workflows.v1beta.Workflows.UpdateWorkflow] +// method. +message UpdateWorkflowRequest { + // Required. Workflow to be updated. + Workflow workflow = 1 [(google.api.field_behavior) = REQUIRED]; + + // List of fields to be updated. If not present, the entire workflow + // will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // API version used to start the operation. + string api_version = 5; +} diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 1f40a7d..7252d81 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -23,8 +23,857 @@ export namespace google { /** Namespace workflows. */ namespace workflows { - /** Namespace v1alpha1. */ - namespace v1alpha1 { + /** Namespace executions. */ + namespace executions { + + /** Namespace v1beta. */ + namespace v1beta { + + /** Represents an Executions */ + class Executions extends $protobuf.rpc.Service { + + /** + * Constructs a new Executions 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 Executions 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): Executions; + + /** + * Calls ListExecutions. + * @param request ListExecutionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExecutionsResponse + */ + public listExecutions(request: google.cloud.workflows.executions.v1beta.IListExecutionsRequest, callback: google.cloud.workflows.executions.v1beta.Executions.ListExecutionsCallback): void; + + /** + * Calls ListExecutions. + * @param request ListExecutionsRequest message or plain object + * @returns Promise + */ + public listExecutions(request: google.cloud.workflows.executions.v1beta.IListExecutionsRequest): Promise; + + /** + * Calls CreateExecution. + * @param request CreateExecutionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Execution + */ + public createExecution(request: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, callback: google.cloud.workflows.executions.v1beta.Executions.CreateExecutionCallback): void; + + /** + * Calls CreateExecution. + * @param request CreateExecutionRequest message or plain object + * @returns Promise + */ + public createExecution(request: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest): Promise; + + /** + * Calls GetExecution. + * @param request GetExecutionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Execution + */ + public getExecution(request: google.cloud.workflows.executions.v1beta.IGetExecutionRequest, callback: google.cloud.workflows.executions.v1beta.Executions.GetExecutionCallback): void; + + /** + * Calls GetExecution. + * @param request GetExecutionRequest message or plain object + * @returns Promise + */ + public getExecution(request: google.cloud.workflows.executions.v1beta.IGetExecutionRequest): Promise; + + /** + * Calls CancelExecution. + * @param request CancelExecutionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Execution + */ + public cancelExecution(request: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, callback: google.cloud.workflows.executions.v1beta.Executions.CancelExecutionCallback): void; + + /** + * Calls CancelExecution. + * @param request CancelExecutionRequest message or plain object + * @returns Promise + */ + public cancelExecution(request: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest): Promise; + } + + namespace Executions { + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#listExecutions}. + * @param error Error, if any + * @param [response] ListExecutionsResponse + */ + type ListExecutionsCallback = (error: (Error|null), response?: google.cloud.workflows.executions.v1beta.ListExecutionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#createExecution}. + * @param error Error, if any + * @param [response] Execution + */ + type CreateExecutionCallback = (error: (Error|null), response?: google.cloud.workflows.executions.v1beta.Execution) => void; + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#getExecution}. + * @param error Error, if any + * @param [response] Execution + */ + type GetExecutionCallback = (error: (Error|null), response?: google.cloud.workflows.executions.v1beta.Execution) => void; + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#cancelExecution}. + * @param error Error, if any + * @param [response] Execution + */ + type CancelExecutionCallback = (error: (Error|null), response?: google.cloud.workflows.executions.v1beta.Execution) => void; + } + + /** Properties of an Execution. */ + interface IExecution { + + /** Execution name */ + name?: (string|null); + + /** Execution startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Execution endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Execution state */ + state?: (google.cloud.workflows.executions.v1beta.Execution.State|keyof typeof google.cloud.workflows.executions.v1beta.Execution.State|null); + + /** Execution argument */ + argument?: (string|null); + + /** Execution result */ + result?: (string|null); + + /** Execution error */ + error?: (google.cloud.workflows.executions.v1beta.Execution.IError|null); + + /** Execution workflowRevisionId */ + workflowRevisionId?: (string|null); + } + + /** Represents an Execution. */ + class Execution implements IExecution { + + /** + * Constructs a new Execution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.IExecution); + + /** Execution name. */ + public name: string; + + /** Execution startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Execution endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Execution state. */ + public state: (google.cloud.workflows.executions.v1beta.Execution.State|keyof typeof google.cloud.workflows.executions.v1beta.Execution.State); + + /** Execution argument. */ + public argument: string; + + /** Execution result. */ + public result: string; + + /** Execution error. */ + public error?: (google.cloud.workflows.executions.v1beta.Execution.IError|null); + + /** Execution workflowRevisionId. */ + public workflowRevisionId: string; + + /** + * Creates a new Execution instance using the specified properties. + * @param [properties] Properties to set + * @returns Execution instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.IExecution): google.cloud.workflows.executions.v1beta.Execution; + + /** + * Encodes the specified Execution message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.verify|verify} messages. + * @param message Execution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Execution message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.verify|verify} messages. + * @param message Execution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Execution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.Execution; + + /** + * Decodes an Execution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.Execution; + + /** + * Verifies an Execution message. + * @param message Plain 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 Execution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Execution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.Execution; + + /** + * Creates a plain object from an Execution message. Also converts values to other types if specified. + * @param message Execution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.Execution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Execution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Execution { + + /** Properties of an Error. */ + interface IError { + + /** Error payload */ + payload?: (string|null); + + /** Error context */ + context?: (string|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.Execution.IError); + + /** Error payload. */ + public payload: string; + + /** Error context. */ + public context: string; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.Execution.IError): google.cloud.workflows.executions.v1beta.Execution.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.Execution.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.Execution.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.Execution.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.Execution.Error; + + /** + * Verifies an Error message. + * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.Execution.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.Execution.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } + } + + /** Properties of a ListExecutionsRequest. */ + interface IListExecutionsRequest { + + /** ListExecutionsRequest parent */ + parent?: (string|null); + + /** ListExecutionsRequest pageSize */ + pageSize?: (number|null); + + /** ListExecutionsRequest pageToken */ + pageToken?: (string|null); + + /** ListExecutionsRequest view */ + view?: (google.cloud.workflows.executions.v1beta.ExecutionView|keyof typeof google.cloud.workflows.executions.v1beta.ExecutionView|null); + } + + /** Represents a ListExecutionsRequest. */ + class ListExecutionsRequest implements IListExecutionsRequest { + + /** + * Constructs a new ListExecutionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.IListExecutionsRequest); + + /** ListExecutionsRequest parent. */ + public parent: string; + + /** ListExecutionsRequest pageSize. */ + public pageSize: number; + + /** ListExecutionsRequest pageToken. */ + public pageToken: string; + + /** ListExecutionsRequest view. */ + public view: (google.cloud.workflows.executions.v1beta.ExecutionView|keyof typeof google.cloud.workflows.executions.v1beta.ExecutionView); + + /** + * Creates a new ListExecutionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExecutionsRequest instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.IListExecutionsRequest): google.cloud.workflows.executions.v1beta.ListExecutionsRequest; + + /** + * Encodes the specified ListExecutionsRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsRequest.verify|verify} messages. + * @param message ListExecutionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.IListExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExecutionsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsRequest.verify|verify} messages. + * @param message ListExecutionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.IListExecutionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExecutionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExecutionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.ListExecutionsRequest; + + /** + * Decodes a ListExecutionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExecutionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.ListExecutionsRequest; + + /** + * Verifies a ListExecutionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExecutionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExecutionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.ListExecutionsRequest; + + /** + * Creates a plain object from a ListExecutionsRequest message. Also converts values to other types if specified. + * @param message ListExecutionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.ListExecutionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExecutionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListExecutionsResponse. */ + interface IListExecutionsResponse { + + /** ListExecutionsResponse executions */ + executions?: (google.cloud.workflows.executions.v1beta.IExecution[]|null); + + /** ListExecutionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListExecutionsResponse. */ + class ListExecutionsResponse implements IListExecutionsResponse { + + /** + * Constructs a new ListExecutionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.IListExecutionsResponse); + + /** ListExecutionsResponse executions. */ + public executions: google.cloud.workflows.executions.v1beta.IExecution[]; + + /** ListExecutionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListExecutionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExecutionsResponse instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.IListExecutionsResponse): google.cloud.workflows.executions.v1beta.ListExecutionsResponse; + + /** + * Encodes the specified ListExecutionsResponse message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsResponse.verify|verify} messages. + * @param message ListExecutionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.IListExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExecutionsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsResponse.verify|verify} messages. + * @param message ListExecutionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.IListExecutionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExecutionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExecutionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.ListExecutionsResponse; + + /** + * Decodes a ListExecutionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExecutionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.ListExecutionsResponse; + + /** + * Verifies a ListExecutionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListExecutionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExecutionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.ListExecutionsResponse; + + /** + * Creates a plain object from a ListExecutionsResponse message. Also converts values to other types if specified. + * @param message ListExecutionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.ListExecutionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExecutionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateExecutionRequest. */ + interface ICreateExecutionRequest { + + /** CreateExecutionRequest parent */ + parent?: (string|null); + + /** CreateExecutionRequest execution */ + execution?: (google.cloud.workflows.executions.v1beta.IExecution|null); + } + + /** Represents a CreateExecutionRequest. */ + class CreateExecutionRequest implements ICreateExecutionRequest { + + /** + * Constructs a new CreateExecutionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest); + + /** CreateExecutionRequest parent. */ + public parent: string; + + /** CreateExecutionRequest execution. */ + public execution?: (google.cloud.workflows.executions.v1beta.IExecution|null); + + /** + * Creates a new CreateExecutionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExecutionRequest instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest): google.cloud.workflows.executions.v1beta.CreateExecutionRequest; + + /** + * Encodes the specified CreateExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CreateExecutionRequest.verify|verify} messages. + * @param message CreateExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CreateExecutionRequest.verify|verify} messages. + * @param message CreateExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateExecutionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.CreateExecutionRequest; + + /** + * Decodes a CreateExecutionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.CreateExecutionRequest; + + /** + * Verifies a CreateExecutionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExecutionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.CreateExecutionRequest; + + /** + * Creates a plain object from a CreateExecutionRequest message. Also converts values to other types if specified. + * @param message CreateExecutionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.CreateExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateExecutionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetExecutionRequest. */ + interface IGetExecutionRequest { + + /** GetExecutionRequest name */ + name?: (string|null); + + /** GetExecutionRequest view */ + view?: (google.cloud.workflows.executions.v1beta.ExecutionView|keyof typeof google.cloud.workflows.executions.v1beta.ExecutionView|null); + } + + /** Represents a GetExecutionRequest. */ + class GetExecutionRequest implements IGetExecutionRequest { + + /** + * Constructs a new GetExecutionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.IGetExecutionRequest); + + /** GetExecutionRequest name. */ + public name: string; + + /** GetExecutionRequest view. */ + public view: (google.cloud.workflows.executions.v1beta.ExecutionView|keyof typeof google.cloud.workflows.executions.v1beta.ExecutionView); + + /** + * Creates a new GetExecutionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExecutionRequest instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.IGetExecutionRequest): google.cloud.workflows.executions.v1beta.GetExecutionRequest; + + /** + * Encodes the specified GetExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.GetExecutionRequest.verify|verify} messages. + * @param message GetExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.IGetExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.GetExecutionRequest.verify|verify} messages. + * @param message GetExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.IGetExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetExecutionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.GetExecutionRequest; + + /** + * Decodes a GetExecutionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.GetExecutionRequest; + + /** + * Verifies a GetExecutionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExecutionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.GetExecutionRequest; + + /** + * Creates a plain object from a GetExecutionRequest message. Also converts values to other types if specified. + * @param message GetExecutionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.GetExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetExecutionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelExecutionRequest. */ + interface ICancelExecutionRequest { + + /** CancelExecutionRequest name */ + name?: (string|null); + } + + /** Represents a CancelExecutionRequest. */ + class CancelExecutionRequest implements ICancelExecutionRequest { + + /** + * Constructs a new CancelExecutionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest); + + /** CancelExecutionRequest name. */ + public name: string; + + /** + * Creates a new CancelExecutionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelExecutionRequest instance + */ + public static create(properties?: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest): google.cloud.workflows.executions.v1beta.CancelExecutionRequest; + + /** + * Encodes the specified CancelExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CancelExecutionRequest.verify|verify} messages. + * @param message CancelExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CancelExecutionRequest.verify|verify} messages. + * @param message CancelExecutionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelExecutionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.executions.v1beta.CancelExecutionRequest; + + /** + * Decodes a CancelExecutionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.executions.v1beta.CancelExecutionRequest; + + /** + * Verifies a CancelExecutionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelExecutionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.executions.v1beta.CancelExecutionRequest; + + /** + * Creates a plain object from a CancelExecutionRequest message. Also converts values to other types if specified. + * @param message CancelExecutionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.executions.v1beta.CancelExecutionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelExecutionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ExecutionView enum. */ + enum ExecutionView { + EXECUTION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + } + } + + /** Namespace v1beta. */ + namespace v1beta { /** Represents a Workflows */ class Workflows extends $protobuf.rpc.Service { @@ -51,104 +900,104 @@ export namespace google { * @param request ListWorkflowsRequest message or plain object * @param callback Node-style callback called with the error, if any, and ListWorkflowsResponse */ - public listWorkflows(request: google.cloud.workflows.v1alpha1.IListWorkflowsRequest, callback: google.cloud.workflows.v1alpha1.Workflows.ListWorkflowsCallback): void; + public listWorkflows(request: google.cloud.workflows.v1beta.IListWorkflowsRequest, callback: google.cloud.workflows.v1beta.Workflows.ListWorkflowsCallback): void; /** * Calls ListWorkflows. * @param request ListWorkflowsRequest message or plain object * @returns Promise */ - public listWorkflows(request: google.cloud.workflows.v1alpha1.IListWorkflowsRequest): Promise; + public listWorkflows(request: google.cloud.workflows.v1beta.IListWorkflowsRequest): Promise; /** * Calls GetWorkflow. * @param request GetWorkflowRequest message or plain object * @param callback Node-style callback called with the error, if any, and Workflow */ - public getWorkflow(request: google.cloud.workflows.v1alpha1.IGetWorkflowRequest, callback: google.cloud.workflows.v1alpha1.Workflows.GetWorkflowCallback): void; + public getWorkflow(request: google.cloud.workflows.v1beta.IGetWorkflowRequest, callback: google.cloud.workflows.v1beta.Workflows.GetWorkflowCallback): void; /** * Calls GetWorkflow. * @param request GetWorkflowRequest message or plain object * @returns Promise */ - public getWorkflow(request: google.cloud.workflows.v1alpha1.IGetWorkflowRequest): Promise; + public getWorkflow(request: google.cloud.workflows.v1beta.IGetWorkflowRequest): Promise; /** * Calls CreateWorkflow. * @param request CreateWorkflowRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ - public createWorkflow(request: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, callback: google.cloud.workflows.v1alpha1.Workflows.CreateWorkflowCallback): void; + public createWorkflow(request: google.cloud.workflows.v1beta.ICreateWorkflowRequest, callback: google.cloud.workflows.v1beta.Workflows.CreateWorkflowCallback): void; /** * Calls CreateWorkflow. * @param request CreateWorkflowRequest message or plain object * @returns Promise */ - public createWorkflow(request: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest): Promise; + public createWorkflow(request: google.cloud.workflows.v1beta.ICreateWorkflowRequest): Promise; /** * Calls DeleteWorkflow. * @param request DeleteWorkflowRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ - public deleteWorkflow(request: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, callback: google.cloud.workflows.v1alpha1.Workflows.DeleteWorkflowCallback): void; + public deleteWorkflow(request: google.cloud.workflows.v1beta.IDeleteWorkflowRequest, callback: google.cloud.workflows.v1beta.Workflows.DeleteWorkflowCallback): void; /** * Calls DeleteWorkflow. * @param request DeleteWorkflowRequest message or plain object * @returns Promise */ - public deleteWorkflow(request: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest): Promise; + public deleteWorkflow(request: google.cloud.workflows.v1beta.IDeleteWorkflowRequest): Promise; /** * Calls UpdateWorkflow. * @param request UpdateWorkflowRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ - public updateWorkflow(request: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, callback: google.cloud.workflows.v1alpha1.Workflows.UpdateWorkflowCallback): void; + public updateWorkflow(request: google.cloud.workflows.v1beta.IUpdateWorkflowRequest, callback: google.cloud.workflows.v1beta.Workflows.UpdateWorkflowCallback): void; /** * Calls UpdateWorkflow. * @param request UpdateWorkflowRequest message or plain object * @returns Promise */ - public updateWorkflow(request: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest): Promise; + public updateWorkflow(request: google.cloud.workflows.v1beta.IUpdateWorkflowRequest): Promise; } namespace Workflows { /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#listWorkflows}. + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#listWorkflows}. * @param error Error, if any * @param [response] ListWorkflowsResponse */ - type ListWorkflowsCallback = (error: (Error|null), response?: google.cloud.workflows.v1alpha1.ListWorkflowsResponse) => void; + type ListWorkflowsCallback = (error: (Error|null), response?: google.cloud.workflows.v1beta.ListWorkflowsResponse) => void; /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#getWorkflow}. + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#getWorkflow}. * @param error Error, if any * @param [response] Workflow */ - type GetWorkflowCallback = (error: (Error|null), response?: google.cloud.workflows.v1alpha1.Workflow) => void; + type GetWorkflowCallback = (error: (Error|null), response?: google.cloud.workflows.v1beta.Workflow) => void; /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#createWorkflow}. + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#createWorkflow}. * @param error Error, if any * @param [response] Operation */ type CreateWorkflowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#deleteWorkflow}. + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#deleteWorkflow}. * @param error Error, if any * @param [response] Operation */ type DeleteWorkflowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#updateWorkflow}. + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#updateWorkflow}. * @param error Error, if any * @param [response] Operation */ @@ -164,14 +1013,11 @@ export namespace google { /** Workflow description */ description?: (string|null); - /** Workflow sourceContents */ - sourceContents?: (string|null); - /** Workflow state */ - state?: (google.cloud.workflows.v1alpha1.Workflow.State|null); + state?: (google.cloud.workflows.v1beta.Workflow.State|keyof typeof google.cloud.workflows.v1beta.Workflow.State|null); - /** Workflow versionId */ - versionId?: (number|Long|null); + /** Workflow revisionId */ + revisionId?: (string|null); /** Workflow createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -179,11 +1025,17 @@ export namespace google { /** Workflow updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + /** Workflow revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + /** Workflow labels */ labels?: ({ [k: string]: string }|null); /** Workflow serviceAccount */ serviceAccount?: (string|null); + + /** Workflow sourceContents */ + sourceContents?: (string|null); } /** Represents a Workflow. */ @@ -193,7 +1045,7 @@ export namespace google { * Constructs a new Workflow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IWorkflow); + constructor(properties?: google.cloud.workflows.v1beta.IWorkflow); /** Workflow name. */ public name: string; @@ -201,14 +1053,11 @@ export namespace google { /** Workflow description. */ public description: string; - /** Workflow sourceContents. */ - public sourceContents: string; - /** Workflow state. */ - public state: google.cloud.workflows.v1alpha1.Workflow.State; + public state: (google.cloud.workflows.v1beta.Workflow.State|keyof typeof google.cloud.workflows.v1beta.Workflow.State); - /** Workflow versionId. */ - public versionId: (number|Long); + /** Workflow revisionId. */ + public revisionId: string; /** Workflow createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -216,12 +1065,18 @@ export namespace google { /** Workflow updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Workflow revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + /** Workflow labels. */ public labels: { [k: string]: string }; /** Workflow serviceAccount. */ public serviceAccount: string; + /** Workflow sourceContents. */ + public sourceContents: string; + /** Workflow sourceCode. */ public sourceCode?: "sourceContents"; @@ -230,23 +1085,23 @@ export namespace google { * @param [properties] Properties to set * @returns Workflow instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IWorkflow): google.cloud.workflows.v1alpha1.Workflow; + public static create(properties?: google.cloud.workflows.v1beta.IWorkflow): google.cloud.workflows.v1beta.Workflow; /** - * Encodes the specified Workflow message. Does not implicitly {@link google.cloud.workflows.v1alpha1.Workflow.verify|verify} messages. + * Encodes the specified Workflow message. Does not implicitly {@link google.cloud.workflows.v1beta.Workflow.verify|verify} messages. * @param message Workflow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.Workflow.verify|verify} messages. + * Encodes the specified Workflow message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.Workflow.verify|verify} messages. * @param message Workflow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Workflow message from the specified reader or buffer. @@ -256,7 +1111,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.workflows.v1alpha1.Workflow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.Workflow; /** * Decodes a Workflow message from the specified reader or buffer, length delimited. @@ -265,7 +1120,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.workflows.v1alpha1.Workflow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.Workflow; /** * Verifies a Workflow message. @@ -279,7 +1134,7 @@ export namespace google { * @param object Plain object * @returns Workflow */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.Workflow; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.Workflow; /** * Creates a plain object from a Workflow message. Also converts values to other types if specified. @@ -287,7 +1142,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.Workflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.Workflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Workflow to JSON. @@ -301,10 +1156,7 @@ export namespace google { /** State enum. */ enum State { STATE_UNSPECIFIED = 0, - ACTIVE = 1, - FAILED = 2, - DEPLOYING = 3, - DELETING = 4 + ACTIVE = 1 } } @@ -334,7 +1186,7 @@ export namespace google { * Constructs a new ListWorkflowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IListWorkflowsRequest); + constructor(properties?: google.cloud.workflows.v1beta.IListWorkflowsRequest); /** ListWorkflowsRequest parent. */ public parent: string; @@ -356,23 +1208,23 @@ export namespace google { * @param [properties] Properties to set * @returns ListWorkflowsRequest instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IListWorkflowsRequest): google.cloud.workflows.v1alpha1.ListWorkflowsRequest; + public static create(properties?: google.cloud.workflows.v1beta.IListWorkflowsRequest): google.cloud.workflows.v1beta.ListWorkflowsRequest; /** - * Encodes the specified ListWorkflowsRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsRequest.verify|verify} messages. + * Encodes the specified ListWorkflowsRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsRequest.verify|verify} messages. * @param message ListWorkflowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IListWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IListWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsRequest.verify|verify} messages. + * Encodes the specified ListWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsRequest.verify|verify} messages. * @param message ListWorkflowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IListWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IListWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ListWorkflowsRequest message from the specified reader or buffer. @@ -382,7 +1234,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.workflows.v1alpha1.ListWorkflowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.ListWorkflowsRequest; /** * Decodes a ListWorkflowsRequest message from the specified reader or buffer, length delimited. @@ -391,7 +1243,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.workflows.v1alpha1.ListWorkflowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.ListWorkflowsRequest; /** * Verifies a ListWorkflowsRequest message. @@ -405,7 +1257,7 @@ export namespace google { * @param object Plain object * @returns ListWorkflowsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.ListWorkflowsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.ListWorkflowsRequest; /** * Creates a plain object from a ListWorkflowsRequest message. Also converts values to other types if specified. @@ -413,7 +1265,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.ListWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.ListWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ListWorkflowsRequest to JSON. @@ -426,7 +1278,7 @@ export namespace google { interface IListWorkflowsResponse { /** ListWorkflowsResponse workflows */ - workflows?: (google.cloud.workflows.v1alpha1.IWorkflow[]|null); + workflows?: (google.cloud.workflows.v1beta.IWorkflow[]|null); /** ListWorkflowsResponse nextPageToken */ nextPageToken?: (string|null); @@ -442,10 +1294,10 @@ export namespace google { * Constructs a new ListWorkflowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IListWorkflowsResponse); + constructor(properties?: google.cloud.workflows.v1beta.IListWorkflowsResponse); /** ListWorkflowsResponse workflows. */ - public workflows: google.cloud.workflows.v1alpha1.IWorkflow[]; + public workflows: google.cloud.workflows.v1beta.IWorkflow[]; /** ListWorkflowsResponse nextPageToken. */ public nextPageToken: string; @@ -458,23 +1310,23 @@ export namespace google { * @param [properties] Properties to set * @returns ListWorkflowsResponse instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IListWorkflowsResponse): google.cloud.workflows.v1alpha1.ListWorkflowsResponse; + public static create(properties?: google.cloud.workflows.v1beta.IListWorkflowsResponse): google.cloud.workflows.v1beta.ListWorkflowsResponse; /** - * Encodes the specified ListWorkflowsResponse message. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsResponse.verify|verify} messages. + * Encodes the specified ListWorkflowsResponse message. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsResponse.verify|verify} messages. * @param message ListWorkflowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IListWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IListWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsResponse.verify|verify} messages. + * Encodes the specified ListWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsResponse.verify|verify} messages. * @param message ListWorkflowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IListWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IListWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ListWorkflowsResponse message from the specified reader or buffer. @@ -484,7 +1336,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.workflows.v1alpha1.ListWorkflowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.ListWorkflowsResponse; /** * Decodes a ListWorkflowsResponse message from the specified reader or buffer, length delimited. @@ -493,7 +1345,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.workflows.v1alpha1.ListWorkflowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.ListWorkflowsResponse; /** * Verifies a ListWorkflowsResponse message. @@ -507,7 +1359,7 @@ export namespace google { * @param object Plain object * @returns ListWorkflowsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.ListWorkflowsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.ListWorkflowsResponse; /** * Creates a plain object from a ListWorkflowsResponse message. Also converts values to other types if specified. @@ -515,7 +1367,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.ListWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.ListWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ListWorkflowsResponse to JSON. @@ -538,7 +1390,7 @@ export namespace google { * Constructs a new GetWorkflowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IGetWorkflowRequest); + constructor(properties?: google.cloud.workflows.v1beta.IGetWorkflowRequest); /** GetWorkflowRequest name. */ public name: string; @@ -548,23 +1400,23 @@ export namespace google { * @param [properties] Properties to set * @returns GetWorkflowRequest instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IGetWorkflowRequest): google.cloud.workflows.v1alpha1.GetWorkflowRequest; + public static create(properties?: google.cloud.workflows.v1beta.IGetWorkflowRequest): google.cloud.workflows.v1beta.GetWorkflowRequest; /** - * Encodes the specified GetWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.GetWorkflowRequest.verify|verify} messages. + * Encodes the specified GetWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.GetWorkflowRequest.verify|verify} messages. * @param message GetWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IGetWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IGetWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.GetWorkflowRequest.verify|verify} messages. + * Encodes the specified GetWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.GetWorkflowRequest.verify|verify} messages. * @param message GetWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IGetWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IGetWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GetWorkflowRequest message from the specified reader or buffer. @@ -574,7 +1426,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.workflows.v1alpha1.GetWorkflowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.GetWorkflowRequest; /** * Decodes a GetWorkflowRequest message from the specified reader or buffer, length delimited. @@ -583,7 +1435,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.workflows.v1alpha1.GetWorkflowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.GetWorkflowRequest; /** * Verifies a GetWorkflowRequest message. @@ -597,7 +1449,7 @@ export namespace google { * @param object Plain object * @returns GetWorkflowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.GetWorkflowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.GetWorkflowRequest; /** * Creates a plain object from a GetWorkflowRequest message. Also converts values to other types if specified. @@ -605,7 +1457,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.GetWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.GetWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetWorkflowRequest to JSON. @@ -621,7 +1473,7 @@ export namespace google { parent?: (string|null); /** CreateWorkflowRequest workflow */ - workflow?: (google.cloud.workflows.v1alpha1.IWorkflow|null); + workflow?: (google.cloud.workflows.v1beta.IWorkflow|null); /** CreateWorkflowRequest workflowId */ workflowId?: (string|null); @@ -634,13 +1486,13 @@ export namespace google { * Constructs a new CreateWorkflowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest); + constructor(properties?: google.cloud.workflows.v1beta.ICreateWorkflowRequest); /** CreateWorkflowRequest parent. */ public parent: string; /** CreateWorkflowRequest workflow. */ - public workflow?: (google.cloud.workflows.v1alpha1.IWorkflow|null); + public workflow?: (google.cloud.workflows.v1beta.IWorkflow|null); /** CreateWorkflowRequest workflowId. */ public workflowId: string; @@ -650,23 +1502,23 @@ export namespace google { * @param [properties] Properties to set * @returns CreateWorkflowRequest instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest): google.cloud.workflows.v1alpha1.CreateWorkflowRequest; + public static create(properties?: google.cloud.workflows.v1beta.ICreateWorkflowRequest): google.cloud.workflows.v1beta.CreateWorkflowRequest; /** - * Encodes the specified CreateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.CreateWorkflowRequest.verify|verify} messages. + * Encodes the specified CreateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.CreateWorkflowRequest.verify|verify} messages. * @param message CreateWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.ICreateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.CreateWorkflowRequest.verify|verify} messages. + * Encodes the specified CreateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.CreateWorkflowRequest.verify|verify} messages. * @param message CreateWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.ICreateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CreateWorkflowRequest message from the specified reader or buffer. @@ -676,7 +1528,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.workflows.v1alpha1.CreateWorkflowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.CreateWorkflowRequest; /** * Decodes a CreateWorkflowRequest message from the specified reader or buffer, length delimited. @@ -685,7 +1537,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.workflows.v1alpha1.CreateWorkflowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.CreateWorkflowRequest; /** * Verifies a CreateWorkflowRequest message. @@ -699,7 +1551,7 @@ export namespace google { * @param object Plain object * @returns CreateWorkflowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.CreateWorkflowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.CreateWorkflowRequest; /** * Creates a plain object from a CreateWorkflowRequest message. Also converts values to other types if specified. @@ -707,7 +1559,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.CreateWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.CreateWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CreateWorkflowRequest to JSON. @@ -730,7 +1582,7 @@ export namespace google { * Constructs a new DeleteWorkflowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest); + constructor(properties?: google.cloud.workflows.v1beta.IDeleteWorkflowRequest); /** DeleteWorkflowRequest name. */ public name: string; @@ -740,23 +1592,23 @@ export namespace google { * @param [properties] Properties to set * @returns DeleteWorkflowRequest instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest): google.cloud.workflows.v1alpha1.DeleteWorkflowRequest; + public static create(properties?: google.cloud.workflows.v1beta.IDeleteWorkflowRequest): google.cloud.workflows.v1beta.DeleteWorkflowRequest; /** - * Encodes the specified DeleteWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.DeleteWorkflowRequest.verify|verify} messages. + * Encodes the specified DeleteWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.DeleteWorkflowRequest.verify|verify} messages. * @param message DeleteWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IDeleteWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.DeleteWorkflowRequest.verify|verify} messages. + * Encodes the specified DeleteWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.DeleteWorkflowRequest.verify|verify} messages. * @param message DeleteWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IDeleteWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DeleteWorkflowRequest message from the specified reader or buffer. @@ -766,7 +1618,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.workflows.v1alpha1.DeleteWorkflowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.DeleteWorkflowRequest; /** * Decodes a DeleteWorkflowRequest message from the specified reader or buffer, length delimited. @@ -775,7 +1627,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.workflows.v1alpha1.DeleteWorkflowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.DeleteWorkflowRequest; /** * Verifies a DeleteWorkflowRequest message. @@ -789,7 +1641,7 @@ export namespace google { * @param object Plain object * @returns DeleteWorkflowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.DeleteWorkflowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.DeleteWorkflowRequest; /** * Creates a plain object from a DeleteWorkflowRequest message. Also converts values to other types if specified. @@ -797,7 +1649,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.DeleteWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.DeleteWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this DeleteWorkflowRequest to JSON. @@ -810,7 +1662,7 @@ export namespace google { interface IUpdateWorkflowRequest { /** UpdateWorkflowRequest workflow */ - workflow?: (google.cloud.workflows.v1alpha1.IWorkflow|null); + workflow?: (google.cloud.workflows.v1beta.IWorkflow|null); /** UpdateWorkflowRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); @@ -823,10 +1675,10 @@ export namespace google { * Constructs a new UpdateWorkflowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest); + constructor(properties?: google.cloud.workflows.v1beta.IUpdateWorkflowRequest); /** UpdateWorkflowRequest workflow. */ - public workflow?: (google.cloud.workflows.v1alpha1.IWorkflow|null); + public workflow?: (google.cloud.workflows.v1beta.IWorkflow|null); /** UpdateWorkflowRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); @@ -836,23 +1688,23 @@ export namespace google { * @param [properties] Properties to set * @returns UpdateWorkflowRequest instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest): google.cloud.workflows.v1alpha1.UpdateWorkflowRequest; + public static create(properties?: google.cloud.workflows.v1beta.IUpdateWorkflowRequest): google.cloud.workflows.v1beta.UpdateWorkflowRequest; /** - * Encodes the specified UpdateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.verify|verify} messages. + * Encodes the specified UpdateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.UpdateWorkflowRequest.verify|verify} messages. * @param message UpdateWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IUpdateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.verify|verify} messages. + * Encodes the specified UpdateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.UpdateWorkflowRequest.verify|verify} messages. * @param message UpdateWorkflowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IUpdateWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an UpdateWorkflowRequest message from the specified reader or buffer. @@ -862,7 +1714,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.workflows.v1alpha1.UpdateWorkflowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.UpdateWorkflowRequest; /** * Decodes an UpdateWorkflowRequest message from the specified reader or buffer, length delimited. @@ -871,7 +1723,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.workflows.v1alpha1.UpdateWorkflowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.UpdateWorkflowRequest; /** * Verifies an UpdateWorkflowRequest message. @@ -885,7 +1737,7 @@ export namespace google { * @param object Plain object * @returns UpdateWorkflowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.UpdateWorkflowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.UpdateWorkflowRequest; /** * Creates a plain object from an UpdateWorkflowRequest message. Also converts values to other types if specified. @@ -893,7 +1745,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.UpdateWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.UpdateWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this UpdateWorkflowRequest to JSON. @@ -917,12 +1769,6 @@ export namespace google { /** OperationMetadata verb */ verb?: (string|null); - /** OperationMetadata statusDetail */ - statusDetail?: (string|null); - - /** OperationMetadata cancelRequested */ - cancelRequested?: (boolean|null); - /** OperationMetadata apiVersion */ apiVersion?: (string|null); } @@ -934,7 +1780,7 @@ export namespace google { * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.workflows.v1alpha1.IOperationMetadata); + constructor(properties?: google.cloud.workflows.v1beta.IOperationMetadata); /** OperationMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -948,12 +1794,6 @@ export namespace google { /** OperationMetadata verb. */ public verb: string; - /** OperationMetadata statusDetail. */ - public statusDetail: string; - - /** OperationMetadata cancelRequested. */ - public cancelRequested: boolean; - /** OperationMetadata apiVersion. */ public apiVersion: string; @@ -962,23 +1802,23 @@ export namespace google { * @param [properties] Properties to set * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.workflows.v1alpha1.IOperationMetadata): google.cloud.workflows.v1alpha1.OperationMetadata; + public static create(properties?: google.cloud.workflows.v1beta.IOperationMetadata): google.cloud.workflows.v1beta.OperationMetadata; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.workflows.v1alpha1.OperationMetadata.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.workflows.v1beta.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.workflows.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.workflows.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.OperationMetadata.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.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.workflows.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.workflows.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an OperationMetadata message from the specified reader or buffer. @@ -988,7 +1828,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.workflows.v1alpha1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1beta.OperationMetadata; /** * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. @@ -997,7 +1837,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.workflows.v1alpha1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1beta.OperationMetadata; /** * Verifies an OperationMetadata message. @@ -1011,7 +1851,7 @@ export namespace google { * @param object Plain object * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1alpha1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1beta.OperationMetadata; /** * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. @@ -1019,7 +1859,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.workflows.v1alpha1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.workflows.v1beta.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this OperationMetadata to JSON. @@ -1396,7 +2236,7 @@ export namespace google { nameField?: (string|null); /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); /** ResourceDescriptor plural */ plural?: (string|null); @@ -1424,7 +2264,7 @@ export namespace google { public nameField: string; /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); /** ResourceDescriptor plural. */ public plural: string; @@ -2304,10 +3144,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -2326,6 +3166,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -2344,10 +3187,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -2367,6 +3210,9 @@ export namespace google { /** 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 @@ -3122,7 +3968,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -3198,7 +4044,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -3447,13 +4293,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -3484,13 +4330,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.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; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -3989,7 +4835,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -4017,7 +4863,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -4113,16 +4959,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -4144,16 +4990,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -4736,6 +5582,102 @@ export namespace google { } } + /** 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 }; + } + /** Properties of an Any. */ interface IAny { @@ -4743,7 +5685,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -4759,7 +5701,7 @@ export namespace google { public type_url: string; /** Any value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new Any instance using the specified properties. @@ -4836,7 +5778,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -4852,7 +5794,7 @@ export namespace google { constructor(properties?: google.protobuf.IDuration); /** Duration seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Duration nanos. */ public nanos: number; @@ -5101,102 +6043,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|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); - - /** 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 }; - } } /** Namespace longrunning. */ diff --git a/protos/protos.js b/protos/protos.js index 72ac86e..7546f93 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_workflows_protos || ($protobuf.roots._google_cloud_workflows_protos = {}); $root.google = (function() { @@ -57,20 +57,1975 @@ */ var workflows = {}; - workflows.v1alpha1 = (function() { + workflows.executions = (function() { /** - * Namespace v1alpha1. + * Namespace executions. * @memberof google.cloud.workflows * @namespace */ - var v1alpha1 = {}; + var executions = {}; - v1alpha1.Workflows = (function() { + executions.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.cloud.workflows.executions + * @namespace + */ + var v1beta = {}; + + v1beta.Executions = (function() { + + /** + * Constructs a new Executions service. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents an Executions + * @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 Executions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Executions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Executions; + + /** + * Creates new Executions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @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 {Executions} RPC service. Useful where requests and/or responses are streamed. + */ + Executions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#listExecutions}. + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @typedef ListExecutionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} [response] ListExecutionsResponse + */ + + /** + * Calls ListExecutions. + * @function listExecutions + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest} request ListExecutionsRequest message or plain object + * @param {google.cloud.workflows.executions.v1beta.Executions.ListExecutionsCallback} callback Node-style callback called with the error, if any, and ListExecutionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Executions.prototype.listExecutions = function listExecutions(request, callback) { + return this.rpcCall(listExecutions, $root.google.cloud.workflows.executions.v1beta.ListExecutionsRequest, $root.google.cloud.workflows.executions.v1beta.ListExecutionsResponse, request, callback); + }, "name", { value: "ListExecutions" }); + + /** + * Calls ListExecutions. + * @function listExecutions + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest} request ListExecutionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#createExecution}. + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @typedef CreateExecutionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.workflows.executions.v1beta.Execution} [response] Execution + */ + + /** + * Calls CreateExecution. + * @function createExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest} request CreateExecutionRequest message or plain object + * @param {google.cloud.workflows.executions.v1beta.Executions.CreateExecutionCallback} callback Node-style callback called with the error, if any, and Execution + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Executions.prototype.createExecution = function createExecution(request, callback) { + return this.rpcCall(createExecution, $root.google.cloud.workflows.executions.v1beta.CreateExecutionRequest, $root.google.cloud.workflows.executions.v1beta.Execution, request, callback); + }, "name", { value: "CreateExecution" }); + + /** + * Calls CreateExecution. + * @function createExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest} request CreateExecutionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#getExecution}. + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @typedef GetExecutionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.workflows.executions.v1beta.Execution} [response] Execution + */ + + /** + * Calls GetExecution. + * @function getExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest} request GetExecutionRequest message or plain object + * @param {google.cloud.workflows.executions.v1beta.Executions.GetExecutionCallback} callback Node-style callback called with the error, if any, and Execution + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Executions.prototype.getExecution = function getExecution(request, callback) { + return this.rpcCall(getExecution, $root.google.cloud.workflows.executions.v1beta.GetExecutionRequest, $root.google.cloud.workflows.executions.v1beta.Execution, request, callback); + }, "name", { value: "GetExecution" }); + + /** + * Calls GetExecution. + * @function getExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest} request GetExecutionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.workflows.executions.v1beta.Executions#cancelExecution}. + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @typedef CancelExecutionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.workflows.executions.v1beta.Execution} [response] Execution + */ + + /** + * Calls CancelExecution. + * @function cancelExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest} request CancelExecutionRequest message or plain object + * @param {google.cloud.workflows.executions.v1beta.Executions.CancelExecutionCallback} callback Node-style callback called with the error, if any, and Execution + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Executions.prototype.cancelExecution = function cancelExecution(request, callback) { + return this.rpcCall(cancelExecution, $root.google.cloud.workflows.executions.v1beta.CancelExecutionRequest, $root.google.cloud.workflows.executions.v1beta.Execution, request, callback); + }, "name", { value: "CancelExecution" }); + + /** + * Calls CancelExecution. + * @function cancelExecution + * @memberof google.cloud.workflows.executions.v1beta.Executions + * @instance + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest} request CancelExecutionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Executions; + })(); + + v1beta.Execution = (function() { + + /** + * Properties of an Execution. + * @memberof google.cloud.workflows.executions.v1beta + * @interface IExecution + * @property {string|null} [name] Execution name + * @property {google.protobuf.ITimestamp|null} [startTime] Execution startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Execution endTime + * @property {google.cloud.workflows.executions.v1beta.Execution.State|null} [state] Execution state + * @property {string|null} [argument] Execution argument + * @property {string|null} [result] Execution result + * @property {google.cloud.workflows.executions.v1beta.Execution.IError|null} [error] Execution error + * @property {string|null} [workflowRevisionId] Execution workflowRevisionId + */ + + /** + * Constructs a new Execution. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents an Execution. + * @implements IExecution + * @constructor + * @param {google.cloud.workflows.executions.v1beta.IExecution=} [properties] Properties to set + */ + function Execution(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Execution name. + * @member {string} name + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.name = ""; + + /** + * Execution startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.startTime = null; + + /** + * Execution endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.endTime = null; + + /** + * Execution state. + * @member {google.cloud.workflows.executions.v1beta.Execution.State} state + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.state = 0; + + /** + * Execution argument. + * @member {string} argument + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.argument = ""; + + /** + * Execution result. + * @member {string} result + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.result = ""; + + /** + * Execution error. + * @member {google.cloud.workflows.executions.v1beta.Execution.IError|null|undefined} error + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.error = null; + + /** + * Execution workflowRevisionId. + * @member {string} workflowRevisionId + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + */ + Execution.prototype.workflowRevisionId = ""; + + /** + * Creates a new Execution instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {google.cloud.workflows.executions.v1beta.IExecution=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.Execution} Execution instance + */ + Execution.create = function create(properties) { + return new Execution(properties); + }; + + /** + * Encodes the specified Execution message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {google.cloud.workflows.executions.v1beta.IExecution} message Execution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Execution.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.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.argument != null && Object.hasOwnProperty.call(message, "argument")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.argument); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.result); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.workflows.executions.v1beta.Execution.Error.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.workflowRevisionId != null && Object.hasOwnProperty.call(message, "workflowRevisionId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.workflowRevisionId); + return writer; + }; + + /** + * Encodes the specified Execution message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {google.cloud.workflows.executions.v1beta.IExecution} message Execution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Execution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Execution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.Execution} Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Execution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.Execution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.argument = reader.string(); + break; + case 6: + message.result = reader.string(); + break; + case 7: + message.error = $root.google.cloud.workflows.executions.v1beta.Execution.Error.decode(reader, reader.uint32()); + break; + case 8: + message.workflowRevisionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Execution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.Execution} Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Execution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Execution message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Execution.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.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.argument != null && message.hasOwnProperty("argument")) + if (!$util.isString(message.argument)) + return "argument: string expected"; + if (message.result != null && message.hasOwnProperty("result")) + if (!$util.isString(message.result)) + return "result: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.cloud.workflows.executions.v1beta.Execution.Error.verify(message.error); + if (error) + return "error." + error; + } + if (message.workflowRevisionId != null && message.hasOwnProperty("workflowRevisionId")) + if (!$util.isString(message.workflowRevisionId)) + return "workflowRevisionId: string expected"; + return null; + }; + + /** + * Creates an Execution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.Execution} Execution + */ + Execution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.Execution) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.Execution(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.workflows.executions.v1beta.Execution.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.workflows.executions.v1beta.Execution.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + 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.argument != null) + message.argument = String(object.argument); + if (object.result != null) + message.result = String(object.result); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.workflows.executions.v1beta.Execution.error: object expected"); + message.error = $root.google.cloud.workflows.executions.v1beta.Execution.Error.fromObject(object.error); + } + if (object.workflowRevisionId != null) + message.workflowRevisionId = String(object.workflowRevisionId); + return message; + }; + + /** + * Creates a plain object from an Execution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @static + * @param {google.cloud.workflows.executions.v1beta.Execution} message Execution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Execution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.argument = ""; + object.result = ""; + object.error = null; + object.workflowRevisionId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.workflows.executions.v1beta.Execution.State[message.state] : message.state; + if (message.argument != null && message.hasOwnProperty("argument")) + object.argument = message.argument; + if (message.result != null && message.hasOwnProperty("result")) + object.result = message.result; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.cloud.workflows.executions.v1beta.Execution.Error.toObject(message.error, options); + if (message.workflowRevisionId != null && message.hasOwnProperty("workflowRevisionId")) + object.workflowRevisionId = message.workflowRevisionId; + return object; + }; + + /** + * Converts this Execution to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @instance + * @returns {Object.} JSON object + */ + Execution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Execution.Error = (function() { + + /** + * Properties of an Error. + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @interface IError + * @property {string|null} [payload] Error payload + * @property {string|null} [context] Error context + */ + + /** + * Constructs a new Error. + * @memberof google.cloud.workflows.executions.v1beta.Execution + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.cloud.workflows.executions.v1beta.Execution.IError=} [properties] Properties to set + */ + function Error(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error payload. + * @member {string} payload + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @instance + */ + Error.prototype.payload = ""; + + /** + * Error context. + * @member {string} context + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @instance + */ + Error.prototype.context = ""; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {google.cloud.workflows.executions.v1beta.Execution.IError=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.Execution.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.Error.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {google.cloud.workflows.executions.v1beta.Execution.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.payload); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.context); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.Execution.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {google.cloud.workflows.executions.v1beta.Execution.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.Execution.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.Execution.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.payload = reader.string(); + break; + case 2: + message.context = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.Execution.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!$util.isString(message.payload)) + return "payload: string expected"; + if (message.context != null && message.hasOwnProperty("context")) + if (!$util.isString(message.context)) + return "context: string expected"; + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.Execution.Error} Error + */ + Error.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.Execution.Error) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.Execution.Error(); + if (object.payload != null) + message.payload = String(object.payload); + if (object.context != null) + message.context = String(object.context); + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @static + * @param {google.cloud.workflows.executions.v1beta.Execution.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.payload = ""; + object.context = ""; + } + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = message.payload; + if (message.context != null && message.hasOwnProperty("context")) + object.context = message.context; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.Execution.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Error; + })(); + + /** + * State enum. + * @name google.cloud.workflows.executions.v1beta.Execution.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + Execution.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + return Execution; + })(); + + v1beta.ListExecutionsRequest = (function() { + + /** + * Properties of a ListExecutionsRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @interface IListExecutionsRequest + * @property {string|null} [parent] ListExecutionsRequest parent + * @property {number|null} [pageSize] ListExecutionsRequest pageSize + * @property {string|null} [pageToken] ListExecutionsRequest pageToken + * @property {google.cloud.workflows.executions.v1beta.ExecutionView|null} [view] ListExecutionsRequest view + */ + + /** + * Constructs a new ListExecutionsRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents a ListExecutionsRequest. + * @implements IListExecutionsRequest + * @constructor + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest=} [properties] Properties to set + */ + function ListExecutionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListExecutionsRequest parent. + * @member {string} parent + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @instance + */ + ListExecutionsRequest.prototype.parent = ""; + + /** + * ListExecutionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @instance + */ + ListExecutionsRequest.prototype.pageSize = 0; + + /** + * ListExecutionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @instance + */ + ListExecutionsRequest.prototype.pageToken = ""; + + /** + * ListExecutionsRequest view. + * @member {google.cloud.workflows.executions.v1beta.ExecutionView} view + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @instance + */ + ListExecutionsRequest.prototype.view = 0; + + /** + * Creates a new ListExecutionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsRequest} ListExecutionsRequest instance + */ + ListExecutionsRequest.create = function create(properties) { + return new ListExecutionsRequest(properties); + }; + + /** + * Encodes the specified ListExecutionsRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest} message ListExecutionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExecutionsRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListExecutionsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsRequest} message ListExecutionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExecutionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExecutionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsRequest} ListExecutionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExecutionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.ListExecutionsRequest(); + 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.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExecutionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsRequest} ListExecutionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExecutionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExecutionsRequest message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExecutionsRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListExecutionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsRequest} ListExecutionsRequest + */ + ListExecutionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.ListExecutionsRequest) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.ListExecutionsRequest(); + 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); + switch (object.view) { + case "EXECUTION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListExecutionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ListExecutionsRequest} message ListExecutionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExecutionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "EXECUTION_VIEW_UNSPECIFIED" : 0; + } + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.workflows.executions.v1beta.ExecutionView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListExecutionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListExecutionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExecutionsRequest; + })(); + + v1beta.ListExecutionsResponse = (function() { + + /** + * Properties of a ListExecutionsResponse. + * @memberof google.cloud.workflows.executions.v1beta + * @interface IListExecutionsResponse + * @property {Array.|null} [executions] ListExecutionsResponse executions + * @property {string|null} [nextPageToken] ListExecutionsResponse nextPageToken + */ + + /** + * Constructs a new ListExecutionsResponse. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents a ListExecutionsResponse. + * @implements IListExecutionsResponse + * @constructor + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsResponse=} [properties] Properties to set + */ + function ListExecutionsResponse(properties) { + this.executions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListExecutionsResponse executions. + * @member {Array.} executions + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @instance + */ + ListExecutionsResponse.prototype.executions = $util.emptyArray; + + /** + * ListExecutionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @instance + */ + ListExecutionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExecutionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsResponse=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} ListExecutionsResponse instance + */ + ListExecutionsResponse.create = function create(properties) { + return new ListExecutionsResponse(properties); + }; + + /** + * Encodes the specified ListExecutionsResponse message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsResponse} message ListExecutionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExecutionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executions != null && message.executions.length) + for (var i = 0; i < message.executions.length; ++i) + $root.google.cloud.workflows.executions.v1beta.Execution.encode(message.executions[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 ListExecutionsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.ListExecutionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {google.cloud.workflows.executions.v1beta.IListExecutionsResponse} message ListExecutionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExecutionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExecutionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} ListExecutionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExecutionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.ListExecutionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.executions && message.executions.length)) + message.executions = []; + message.executions.push($root.google.cloud.workflows.executions.v1beta.Execution.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExecutionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} ListExecutionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExecutionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExecutionsResponse message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExecutionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executions != null && message.hasOwnProperty("executions")) { + if (!Array.isArray(message.executions)) + return "executions: array expected"; + for (var i = 0; i < message.executions.length; ++i) { + var error = $root.google.cloud.workflows.executions.v1beta.Execution.verify(message.executions[i]); + if (error) + return "executions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListExecutionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} ListExecutionsResponse + */ + ListExecutionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.ListExecutionsResponse) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.ListExecutionsResponse(); + if (object.executions) { + if (!Array.isArray(object.executions)) + throw TypeError(".google.cloud.workflows.executions.v1beta.ListExecutionsResponse.executions: array expected"); + message.executions = []; + for (var i = 0; i < object.executions.length; ++i) { + if (typeof object.executions[i] !== "object") + throw TypeError(".google.cloud.workflows.executions.v1beta.ListExecutionsResponse.executions: object expected"); + message.executions[i] = $root.google.cloud.workflows.executions.v1beta.Execution.fromObject(object.executions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListExecutionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @static + * @param {google.cloud.workflows.executions.v1beta.ListExecutionsResponse} message ListExecutionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExecutionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.executions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.executions && message.executions.length) { + object.executions = []; + for (var j = 0; j < message.executions.length; ++j) + object.executions[j] = $root.google.cloud.workflows.executions.v1beta.Execution.toObject(message.executions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListExecutionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.ListExecutionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListExecutionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListExecutionsResponse; + })(); + + v1beta.CreateExecutionRequest = (function() { + + /** + * Properties of a CreateExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @interface ICreateExecutionRequest + * @property {string|null} [parent] CreateExecutionRequest parent + * @property {google.cloud.workflows.executions.v1beta.IExecution|null} [execution] CreateExecutionRequest execution + */ + + /** + * Constructs a new CreateExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents a CreateExecutionRequest. + * @implements ICreateExecutionRequest + * @constructor + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest=} [properties] Properties to set + */ + function CreateExecutionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateExecutionRequest parent. + * @member {string} parent + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @instance + */ + CreateExecutionRequest.prototype.parent = ""; + + /** + * CreateExecutionRequest execution. + * @member {google.cloud.workflows.executions.v1beta.IExecution|null|undefined} execution + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @instance + */ + CreateExecutionRequest.prototype.execution = null; + + /** + * Creates a new CreateExecutionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.CreateExecutionRequest} CreateExecutionRequest instance + */ + CreateExecutionRequest.create = function create(properties) { + return new CreateExecutionRequest(properties); + }; + + /** + * Encodes the specified CreateExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CreateExecutionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest} message CreateExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExecutionRequest.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.execution != null && Object.hasOwnProperty.call(message, "execution")) + $root.google.cloud.workflows.executions.v1beta.Execution.encode(message.execution, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CreateExecutionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICreateExecutionRequest} message CreateExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExecutionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateExecutionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.CreateExecutionRequest} CreateExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExecutionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.CreateExecutionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.execution = $root.google.cloud.workflows.executions.v1beta.Execution.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateExecutionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.CreateExecutionRequest} CreateExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExecutionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateExecutionRequest message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExecutionRequest.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.execution != null && message.hasOwnProperty("execution")) { + var error = $root.google.cloud.workflows.executions.v1beta.Execution.verify(message.execution); + if (error) + return "execution." + error; + } + return null; + }; + + /** + * Creates a CreateExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.CreateExecutionRequest} CreateExecutionRequest + */ + CreateExecutionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.CreateExecutionRequest) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.CreateExecutionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.execution != null) { + if (typeof object.execution !== "object") + throw TypeError(".google.cloud.workflows.executions.v1beta.CreateExecutionRequest.execution: object expected"); + message.execution = $root.google.cloud.workflows.executions.v1beta.Execution.fromObject(object.execution); + } + return message; + }; + + /** + * Creates a plain object from a CreateExecutionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.CreateExecutionRequest} message CreateExecutionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExecutionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.execution = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.execution != null && message.hasOwnProperty("execution")) + object.execution = $root.google.cloud.workflows.executions.v1beta.Execution.toObject(message.execution, options); + return object; + }; + + /** + * Converts this CreateExecutionRequest to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.CreateExecutionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExecutionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateExecutionRequest; + })(); + + v1beta.GetExecutionRequest = (function() { + + /** + * Properties of a GetExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @interface IGetExecutionRequest + * @property {string|null} [name] GetExecutionRequest name + * @property {google.cloud.workflows.executions.v1beta.ExecutionView|null} [view] GetExecutionRequest view + */ + + /** + * Constructs a new GetExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents a GetExecutionRequest. + * @implements IGetExecutionRequest + * @constructor + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest=} [properties] Properties to set + */ + function GetExecutionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetExecutionRequest name. + * @member {string} name + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @instance + */ + GetExecutionRequest.prototype.name = ""; + + /** + * GetExecutionRequest view. + * @member {google.cloud.workflows.executions.v1beta.ExecutionView} view + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @instance + */ + GetExecutionRequest.prototype.view = 0; + + /** + * Creates a new GetExecutionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.GetExecutionRequest} GetExecutionRequest instance + */ + GetExecutionRequest.create = function create(properties) { + return new GetExecutionRequest(properties); + }; + + /** + * Encodes the specified GetExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.GetExecutionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest} message GetExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExecutionRequest.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 GetExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.GetExecutionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.IGetExecutionRequest} message GetExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExecutionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExecutionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.GetExecutionRequest} GetExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExecutionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.GetExecutionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetExecutionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.GetExecutionRequest} GetExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExecutionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetExecutionRequest message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExecutionRequest.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: + break; + } + return null; + }; + + /** + * Creates a GetExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.GetExecutionRequest} GetExecutionRequest + */ + GetExecutionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.GetExecutionRequest) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.GetExecutionRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "EXECUTION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetExecutionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.GetExecutionRequest} message GetExecutionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExecutionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "EXECUTION_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.workflows.executions.v1beta.ExecutionView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetExecutionRequest to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.GetExecutionRequest + * @instance + * @returns {Object.} JSON object + */ + GetExecutionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetExecutionRequest; + })(); + + v1beta.CancelExecutionRequest = (function() { + + /** + * Properties of a CancelExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @interface ICancelExecutionRequest + * @property {string|null} [name] CancelExecutionRequest name + */ + + /** + * Constructs a new CancelExecutionRequest. + * @memberof google.cloud.workflows.executions.v1beta + * @classdesc Represents a CancelExecutionRequest. + * @implements ICancelExecutionRequest + * @constructor + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest=} [properties] Properties to set + */ + function CancelExecutionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelExecutionRequest name. + * @member {string} name + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @instance + */ + CancelExecutionRequest.prototype.name = ""; + + /** + * Creates a new CancelExecutionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.executions.v1beta.CancelExecutionRequest} CancelExecutionRequest instance + */ + CancelExecutionRequest.create = function create(properties) { + return new CancelExecutionRequest(properties); + }; + + /** + * Encodes the specified CancelExecutionRequest message. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CancelExecutionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest} message CancelExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelExecutionRequest.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 CancelExecutionRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.executions.v1beta.CancelExecutionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.ICancelExecutionRequest} message CancelExecutionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelExecutionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelExecutionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.executions.v1beta.CancelExecutionRequest} CancelExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelExecutionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.executions.v1beta.CancelExecutionRequest(); + 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 CancelExecutionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.executions.v1beta.CancelExecutionRequest} CancelExecutionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelExecutionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelExecutionRequest message. + * @function verify + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelExecutionRequest.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 CancelExecutionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.executions.v1beta.CancelExecutionRequest} CancelExecutionRequest + */ + CancelExecutionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.executions.v1beta.CancelExecutionRequest) + return object; + var message = new $root.google.cloud.workflows.executions.v1beta.CancelExecutionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelExecutionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @static + * @param {google.cloud.workflows.executions.v1beta.CancelExecutionRequest} message CancelExecutionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelExecutionRequest.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 CancelExecutionRequest to JSON. + * @function toJSON + * @memberof google.cloud.workflows.executions.v1beta.CancelExecutionRequest + * @instance + * @returns {Object.} JSON object + */ + CancelExecutionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelExecutionRequest; + })(); + + /** + * ExecutionView enum. + * @name google.cloud.workflows.executions.v1beta.ExecutionView + * @enum {number} + * @property {number} EXECUTION_VIEW_UNSPECIFIED=0 EXECUTION_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1beta.ExecutionView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + return v1beta; + })(); + + return executions; + })(); + + workflows.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.cloud.workflows + * @namespace + */ + var v1beta = {}; + + v1beta.Workflows = (function() { /** * Constructs a new Workflows service. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a Workflows * @extends $protobuf.rpc.Service * @constructor @@ -87,7 +2042,7 @@ /** * Creates new Workflows service using the specified rpc implementation. * @function create - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited @@ -99,74 +2054,74 @@ }; /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#listWorkflows}. - * @memberof google.cloud.workflows.v1alpha1.Workflows + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#listWorkflows}. + * @memberof google.cloud.workflows.v1beta.Workflows * @typedef ListWorkflowsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} [response] ListWorkflowsResponse + * @param {google.cloud.workflows.v1beta.ListWorkflowsResponse} [response] ListWorkflowsResponse */ /** * Calls ListWorkflows. * @function listWorkflows - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest} request ListWorkflowsRequest message or plain object - * @param {google.cloud.workflows.v1alpha1.Workflows.ListWorkflowsCallback} callback Node-style callback called with the error, if any, and ListWorkflowsResponse + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest} request ListWorkflowsRequest message or plain object + * @param {google.cloud.workflows.v1beta.Workflows.ListWorkflowsCallback} callback Node-style callback called with the error, if any, and ListWorkflowsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(Workflows.prototype.listWorkflows = function listWorkflows(request, callback) { - return this.rpcCall(listWorkflows, $root.google.cloud.workflows.v1alpha1.ListWorkflowsRequest, $root.google.cloud.workflows.v1alpha1.ListWorkflowsResponse, request, callback); + return this.rpcCall(listWorkflows, $root.google.cloud.workflows.v1beta.ListWorkflowsRequest, $root.google.cloud.workflows.v1beta.ListWorkflowsResponse, request, callback); }, "name", { value: "ListWorkflows" }); /** * Calls ListWorkflows. * @function listWorkflows - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest} request ListWorkflowsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest} request ListWorkflowsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#getWorkflow}. - * @memberof google.cloud.workflows.v1alpha1.Workflows + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#getWorkflow}. + * @memberof google.cloud.workflows.v1beta.Workflows * @typedef GetWorkflowCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.workflows.v1alpha1.Workflow} [response] Workflow + * @param {google.cloud.workflows.v1beta.Workflow} [response] Workflow */ /** * Calls GetWorkflow. * @function getWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest} request GetWorkflowRequest message or plain object - * @param {google.cloud.workflows.v1alpha1.Workflows.GetWorkflowCallback} callback Node-style callback called with the error, if any, and Workflow + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest} request GetWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.Workflows.GetWorkflowCallback} callback Node-style callback called with the error, if any, and Workflow * @returns {undefined} * @variation 1 */ Object.defineProperty(Workflows.prototype.getWorkflow = function getWorkflow(request, callback) { - return this.rpcCall(getWorkflow, $root.google.cloud.workflows.v1alpha1.GetWorkflowRequest, $root.google.cloud.workflows.v1alpha1.Workflow, request, callback); + return this.rpcCall(getWorkflow, $root.google.cloud.workflows.v1beta.GetWorkflowRequest, $root.google.cloud.workflows.v1beta.Workflow, request, callback); }, "name", { value: "GetWorkflow" }); /** * Calls GetWorkflow. * @function getWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest} request GetWorkflowRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest} request GetWorkflowRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#createWorkflow}. - * @memberof google.cloud.workflows.v1alpha1.Workflows + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#createWorkflow}. + * @memberof google.cloud.workflows.v1beta.Workflows * @typedef CreateWorkflowCallback * @type {function} * @param {Error|null} error Error, if any @@ -176,30 +2131,30 @@ /** * Calls CreateWorkflow. * @function createWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest} request CreateWorkflowRequest message or plain object - * @param {google.cloud.workflows.v1alpha1.Workflows.CreateWorkflowCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest} request CreateWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.Workflows.CreateWorkflowCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(Workflows.prototype.createWorkflow = function createWorkflow(request, callback) { - return this.rpcCall(createWorkflow, $root.google.cloud.workflows.v1alpha1.CreateWorkflowRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(createWorkflow, $root.google.cloud.workflows.v1beta.CreateWorkflowRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateWorkflow" }); /** * Calls CreateWorkflow. * @function createWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest} request CreateWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest} request CreateWorkflowRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#deleteWorkflow}. - * @memberof google.cloud.workflows.v1alpha1.Workflows + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#deleteWorkflow}. + * @memberof google.cloud.workflows.v1beta.Workflows * @typedef DeleteWorkflowCallback * @type {function} * @param {Error|null} error Error, if any @@ -209,30 +2164,30 @@ /** * Calls DeleteWorkflow. * @function deleteWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest} request DeleteWorkflowRequest message or plain object - * @param {google.cloud.workflows.v1alpha1.Workflows.DeleteWorkflowCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest} request DeleteWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.Workflows.DeleteWorkflowCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(Workflows.prototype.deleteWorkflow = function deleteWorkflow(request, callback) { - return this.rpcCall(deleteWorkflow, $root.google.cloud.workflows.v1alpha1.DeleteWorkflowRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(deleteWorkflow, $root.google.cloud.workflows.v1beta.DeleteWorkflowRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteWorkflow" }); /** * Calls DeleteWorkflow. * @function deleteWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest} request DeleteWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest} request DeleteWorkflowRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.workflows.v1alpha1.Workflows#updateWorkflow}. - * @memberof google.cloud.workflows.v1alpha1.Workflows + * Callback as used by {@link google.cloud.workflows.v1beta.Workflows#updateWorkflow}. + * @memberof google.cloud.workflows.v1beta.Workflows * @typedef UpdateWorkflowCallback * @type {function} * @param {Error|null} error Error, if any @@ -242,23 +2197,23 @@ /** * Calls UpdateWorkflow. * @function updateWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest} request UpdateWorkflowRequest message or plain object - * @param {google.cloud.workflows.v1alpha1.Workflows.UpdateWorkflowCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest} request UpdateWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.Workflows.UpdateWorkflowCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(Workflows.prototype.updateWorkflow = function updateWorkflow(request, callback) { - return this.rpcCall(updateWorkflow, $root.google.cloud.workflows.v1alpha1.UpdateWorkflowRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(updateWorkflow, $root.google.cloud.workflows.v1beta.UpdateWorkflowRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateWorkflow" }); /** * Calls UpdateWorkflow. * @function updateWorkflow - * @memberof google.cloud.workflows.v1alpha1.Workflows + * @memberof google.cloud.workflows.v1beta.Workflows * @instance - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest} request UpdateWorkflowRequest message or plain object + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest} request UpdateWorkflowRequest message or plain object * @returns {Promise} Promise * @variation 2 */ @@ -266,30 +2221,31 @@ return Workflows; })(); - v1alpha1.Workflow = (function() { + v1beta.Workflow = (function() { /** * Properties of a Workflow. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IWorkflow * @property {string|null} [name] Workflow name * @property {string|null} [description] Workflow description - * @property {string|null} [sourceContents] Workflow sourceContents - * @property {google.cloud.workflows.v1alpha1.Workflow.State|null} [state] Workflow state - * @property {number|Long|null} [versionId] Workflow versionId + * @property {google.cloud.workflows.v1beta.Workflow.State|null} [state] Workflow state + * @property {string|null} [revisionId] Workflow revisionId * @property {google.protobuf.ITimestamp|null} [createTime] Workflow createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Workflow updateTime + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] Workflow revisionCreateTime * @property {Object.|null} [labels] Workflow labels * @property {string|null} [serviceAccount] Workflow serviceAccount + * @property {string|null} [sourceContents] Workflow sourceContents */ /** * Constructs a new Workflow. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a Workflow. * @implements IWorkflow * @constructor - * @param {google.cloud.workflows.v1alpha1.IWorkflow=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IWorkflow=} [properties] Properties to set */ function Workflow(properties) { this.labels = {}; @@ -302,7 +2258,7 @@ /** * Workflow name. * @member {string} name - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.name = ""; @@ -310,39 +2266,31 @@ /** * Workflow description. * @member {string} description - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.description = ""; - /** - * Workflow sourceContents. - * @member {string} sourceContents - * @memberof google.cloud.workflows.v1alpha1.Workflow - * @instance - */ - Workflow.prototype.sourceContents = ""; - /** * Workflow state. - * @member {google.cloud.workflows.v1alpha1.Workflow.State} state - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @member {google.cloud.workflows.v1beta.Workflow.State} state + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.state = 0; /** - * Workflow versionId. - * @member {number|Long} versionId - * @memberof google.cloud.workflows.v1alpha1.Workflow + * Workflow revisionId. + * @member {string} revisionId + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ - Workflow.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Workflow.prototype.revisionId = ""; /** * Workflow createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.createTime = null; @@ -350,15 +2298,23 @@ /** * Workflow updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.updateTime = null; + /** + * Workflow revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.workflows.v1beta.Workflow + * @instance + */ + Workflow.prototype.revisionCreateTime = null; + /** * Workflow labels. * @member {Object.} labels - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.labels = $util.emptyObject; @@ -366,18 +2322,26 @@ /** * Workflow serviceAccount. * @member {string} serviceAccount - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Workflow.prototype.serviceAccount = ""; + /** + * Workflow sourceContents. + * @member {string} sourceContents + * @memberof google.cloud.workflows.v1beta.Workflow + * @instance + */ + Workflow.prototype.sourceContents = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Workflow sourceCode. * @member {"sourceContents"|undefined} sourceCode - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance */ Object.defineProperty(Workflow.prototype, "sourceCode", { @@ -388,55 +2352,57 @@ /** * Creates a new Workflow instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static - * @param {google.cloud.workflows.v1alpha1.IWorkflow=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.Workflow} Workflow instance + * @param {google.cloud.workflows.v1beta.IWorkflow=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.Workflow} Workflow instance */ Workflow.create = function create(properties) { return new Workflow(properties); }; /** - * Encodes the specified Workflow message. Does not implicitly {@link google.cloud.workflows.v1alpha1.Workflow.verify|verify} messages. + * Encodes the specified Workflow message. Does not implicitly {@link google.cloud.workflows.v1beta.Workflow.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static - * @param {google.cloud.workflows.v1alpha1.IWorkflow} message Workflow message or plain object to encode + * @param {google.cloud.workflows.v1beta.IWorkflow} message Workflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Workflow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.sourceContents != null && message.hasOwnProperty("sourceContents")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceContents); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.versionId != null && message.hasOwnProperty("versionId")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.versionId); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.labels != null && message.hasOwnProperty("labels")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.revisionId); + 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.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 7, wireType 2 =*/58).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 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.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.sourceContents != null && Object.hasOwnProperty.call(message, "sourceContents")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceContents); return writer; }; /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.Workflow.verify|verify} messages. + * Encodes the specified Workflow message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.Workflow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static - * @param {google.cloud.workflows.v1alpha1.IWorkflow} message Workflow message or plain object to encode + * @param {google.cloud.workflows.v1beta.IWorkflow} message Workflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -447,18 +2413,18 @@ /** * Decodes a Workflow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.Workflow} Workflow + * @returns {google.cloud.workflows.v1beta.Workflow} Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Workflow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.Workflow(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.Workflow(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -469,31 +2435,48 @@ message.description = reader.string(); break; case 3: - message.sourceContents = reader.string(); + message.state = reader.int32(); break; case 4: - message.state = reader.int32(); + message.revisionId = reader.string(); break; case 5: - message.versionId = reader.int64(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 7: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 8: - reader.skip().pos++; if (message.labels === $util.emptyObject) message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); + 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 9: message.serviceAccount = reader.string(); break; + case 10: + message.sourceContents = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -505,10 +2488,10 @@ /** * Decodes a Workflow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.Workflow} Workflow + * @returns {google.cloud.workflows.v1beta.Workflow} Workflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -521,7 +2504,7 @@ /** * Verifies a Workflow message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -536,25 +2519,17 @@ if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.sourceContents != null && message.hasOwnProperty("sourceContents")) { - properties.sourceCode = 1; - if (!$util.isString(message.sourceContents)) - return "sourceContents: 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.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) - return "versionId: integer|Long expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -565,6 +2540,11 @@ if (error) return "updateTime." + error; } + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } if (message.labels != null && message.hasOwnProperty("labels")) { if (!$util.isObject(message.labels)) return "labels: object expected"; @@ -576,27 +2556,30 @@ if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) if (!$util.isString(message.serviceAccount)) return "serviceAccount: string expected"; + if (message.sourceContents != null && message.hasOwnProperty("sourceContents")) { + properties.sourceCode = 1; + if (!$util.isString(message.sourceContents)) + return "sourceContents: string expected"; + } return null; }; /** * Creates a Workflow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.Workflow} Workflow + * @returns {google.cloud.workflows.v1beta.Workflow} Workflow */ Workflow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.Workflow) + if (object instanceof $root.google.cloud.workflows.v1beta.Workflow) return object; - var message = new $root.google.cloud.workflows.v1alpha1.Workflow(); + var message = new $root.google.cloud.workflows.v1beta.Workflow(); if (object.name != null) message.name = String(object.name); if (object.description != null) message.description = String(object.description); - if (object.sourceContents != null) - message.sourceContents = String(object.sourceContents); switch (object.state) { case "STATE_UNSPECIFIED": case 0: @@ -606,56 +2589,44 @@ case 1: message.state = 1; break; - case "FAILED": - case 2: - message.state = 2; - break; - case "DEPLOYING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; } - if (object.versionId != null) - if ($util.Long) - (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; - else if (typeof object.versionId === "string") - message.versionId = parseInt(object.versionId, 10); - else if (typeof object.versionId === "number") - message.versionId = object.versionId; - else if (typeof object.versionId === "object") - message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.Workflow.createTime: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.Workflow.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.workflows.v1alpha1.Workflow.updateTime: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.Workflow.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.workflows.v1beta.Workflow.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.Workflow.labels: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.Workflow.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.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); + if (object.sourceContents != null) + message.sourceContents = String(object.sourceContents); return message; }; /** * Creates a plain object from a Workflow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @static - * @param {google.cloud.workflows.v1alpha1.Workflow} message Workflow + * @param {google.cloud.workflows.v1beta.Workflow} message Workflow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -669,35 +2640,26 @@ object.name = ""; object.description = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionId = options.longs === String ? "0" : 0; + object.revisionId = ""; object.createTime = null; object.updateTime = null; + object.revisionCreateTime = null; object.serviceAccount = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (message.sourceContents != null && message.hasOwnProperty("sourceContents")) { - object.sourceContents = message.sourceContents; - if (options.oneofs) - object.sourceCode = "sourceContents"; - } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.workflows.v1alpha1.Workflow.State[message.state] : message.state; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (typeof message.versionId === "number") - object.versionId = options.longs === String ? String(message.versionId) : message.versionId; - else - object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; + object.state = options.enums === String ? $root.google.cloud.workflows.v1beta.Workflow.State[message.state] : message.state; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; 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.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; @@ -706,13 +2668,18 @@ } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; + if (message.sourceContents != null && message.hasOwnProperty("sourceContents")) { + object.sourceContents = message.sourceContents; + if (options.oneofs) + object.sourceCode = "sourceContents"; + } return object; }; /** * Converts this Workflow to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.Workflow + * @memberof google.cloud.workflows.v1beta.Workflow * @instance * @returns {Object.} JSON object */ @@ -722,32 +2689,26 @@ /** * State enum. - * @name google.cloud.workflows.v1alpha1.Workflow.State - * @enum {string} + * @name google.cloud.workflows.v1beta.Workflow.State + * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} ACTIVE=1 ACTIVE value - * @property {number} FAILED=2 FAILED value - * @property {number} DEPLOYING=3 DEPLOYING value - * @property {number} DELETING=4 DELETING value */ Workflow.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "DEPLOYING"] = 3; - values[valuesById[4] = "DELETING"] = 4; return values; })(); return Workflow; })(); - v1alpha1.ListWorkflowsRequest = (function() { + v1beta.ListWorkflowsRequest = (function() { /** * Properties of a ListWorkflowsRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IListWorkflowsRequest * @property {string|null} [parent] ListWorkflowsRequest parent * @property {number|null} [pageSize] ListWorkflowsRequest pageSize @@ -758,11 +2719,11 @@ /** * Constructs a new ListWorkflowsRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a ListWorkflowsRequest. * @implements IListWorkflowsRequest * @constructor - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest=} [properties] Properties to set */ function ListWorkflowsRequest(properties) { if (properties) @@ -774,7 +2735,7 @@ /** * ListWorkflowsRequest parent. * @member {string} parent - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance */ ListWorkflowsRequest.prototype.parent = ""; @@ -782,7 +2743,7 @@ /** * ListWorkflowsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance */ ListWorkflowsRequest.prototype.pageSize = 0; @@ -790,7 +2751,7 @@ /** * ListWorkflowsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance */ ListWorkflowsRequest.prototype.pageToken = ""; @@ -798,7 +2759,7 @@ /** * ListWorkflowsRequest filter. * @member {string} filter - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance */ ListWorkflowsRequest.prototype.filter = ""; @@ -806,7 +2767,7 @@ /** * ListWorkflowsRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance */ ListWorkflowsRequest.prototype.orderBy = ""; @@ -814,46 +2775,46 @@ /** * Creates a new ListWorkflowsRequest instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsRequest} ListWorkflowsRequest instance + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.ListWorkflowsRequest} ListWorkflowsRequest instance */ ListWorkflowsRequest.create = function create(properties) { return new ListWorkflowsRequest(properties); }; /** - * Encodes the specified ListWorkflowsRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsRequest.verify|verify} messages. + * Encodes the specified ListWorkflowsRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest} message ListWorkflowsRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest} message ListWorkflowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ListWorkflowsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified ListWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsRequest.verify|verify} messages. + * Encodes the specified ListWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsRequest} message ListWorkflowsRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IListWorkflowsRequest} message ListWorkflowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -864,18 +2825,18 @@ /** * Decodes a ListWorkflowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsRequest} ListWorkflowsRequest + * @returns {google.cloud.workflows.v1beta.ListWorkflowsRequest} ListWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ListWorkflowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.ListWorkflowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.ListWorkflowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -905,10 +2866,10 @@ /** * Decodes a ListWorkflowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsRequest} ListWorkflowsRequest + * @returns {google.cloud.workflows.v1beta.ListWorkflowsRequest} ListWorkflowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -921,7 +2882,7 @@ /** * Verifies a ListWorkflowsRequest message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -950,15 +2911,15 @@ /** * Creates a ListWorkflowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsRequest} ListWorkflowsRequest + * @returns {google.cloud.workflows.v1beta.ListWorkflowsRequest} ListWorkflowsRequest */ ListWorkflowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.ListWorkflowsRequest) + if (object instanceof $root.google.cloud.workflows.v1beta.ListWorkflowsRequest) return object; - var message = new $root.google.cloud.workflows.v1alpha1.ListWorkflowsRequest(); + var message = new $root.google.cloud.workflows.v1beta.ListWorkflowsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -975,9 +2936,9 @@ /** * Creates a plain object from a ListWorkflowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @static - * @param {google.cloud.workflows.v1alpha1.ListWorkflowsRequest} message ListWorkflowsRequest + * @param {google.cloud.workflows.v1beta.ListWorkflowsRequest} message ListWorkflowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -1008,7 +2969,7 @@ /** * Converts this ListWorkflowsRequest to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsRequest + * @memberof google.cloud.workflows.v1beta.ListWorkflowsRequest * @instance * @returns {Object.} JSON object */ @@ -1019,24 +2980,24 @@ return ListWorkflowsRequest; })(); - v1alpha1.ListWorkflowsResponse = (function() { + v1beta.ListWorkflowsResponse = (function() { /** * Properties of a ListWorkflowsResponse. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IListWorkflowsResponse - * @property {Array.|null} [workflows] ListWorkflowsResponse workflows + * @property {Array.|null} [workflows] ListWorkflowsResponse workflows * @property {string|null} [nextPageToken] ListWorkflowsResponse nextPageToken * @property {Array.|null} [unreachable] ListWorkflowsResponse unreachable */ /** * Constructs a new ListWorkflowsResponse. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a ListWorkflowsResponse. * @implements IListWorkflowsResponse * @constructor - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsResponse=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IListWorkflowsResponse=} [properties] Properties to set */ function ListWorkflowsResponse(properties) { this.workflows = []; @@ -1049,8 +3010,8 @@ /** * ListWorkflowsResponse workflows. - * @member {Array.} workflows - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @member {Array.} workflows + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @instance */ ListWorkflowsResponse.prototype.workflows = $util.emptyArray; @@ -1058,7 +3019,7 @@ /** * ListWorkflowsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @instance */ ListWorkflowsResponse.prototype.nextPageToken = ""; @@ -1066,7 +3027,7 @@ /** * ListWorkflowsResponse unreachable. * @member {Array.} unreachable - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @instance */ ListWorkflowsResponse.prototype.unreachable = $util.emptyArray; @@ -1074,21 +3035,21 @@ /** * Creates a new ListWorkflowsResponse instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsResponse=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} ListWorkflowsResponse instance + * @param {google.cloud.workflows.v1beta.IListWorkflowsResponse=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.ListWorkflowsResponse} ListWorkflowsResponse instance */ ListWorkflowsResponse.create = function create(properties) { return new ListWorkflowsResponse(properties); }; /** - * Encodes the specified ListWorkflowsResponse message. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsResponse.verify|verify} messages. + * Encodes the specified ListWorkflowsResponse message. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsResponse} message ListWorkflowsResponse message or plain object to encode + * @param {google.cloud.workflows.v1beta.IListWorkflowsResponse} message ListWorkflowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1097,8 +3058,8 @@ writer = $Writer.create(); if (message.workflows != null && message.workflows.length) for (var i = 0; i < message.workflows.length; ++i) - $root.google.cloud.workflows.v1alpha1.Workflow.encode(message.workflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + $root.google.cloud.workflows.v1beta.Workflow.encode(message.workflows[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) @@ -1107,11 +3068,11 @@ }; /** - * Encodes the specified ListWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.ListWorkflowsResponse.verify|verify} messages. + * Encodes the specified ListWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.ListWorkflowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static - * @param {google.cloud.workflows.v1alpha1.IListWorkflowsResponse} message ListWorkflowsResponse message or plain object to encode + * @param {google.cloud.workflows.v1beta.IListWorkflowsResponse} message ListWorkflowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1122,25 +3083,25 @@ /** * Decodes a ListWorkflowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} ListWorkflowsResponse + * @returns {google.cloud.workflows.v1beta.ListWorkflowsResponse} ListWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ListWorkflowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.ListWorkflowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.ListWorkflowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.workflows && message.workflows.length)) message.workflows = []; - message.workflows.push($root.google.cloud.workflows.v1alpha1.Workflow.decode(reader, reader.uint32())); + message.workflows.push($root.google.cloud.workflows.v1beta.Workflow.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -1161,10 +3122,10 @@ /** * Decodes a ListWorkflowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} ListWorkflowsResponse + * @returns {google.cloud.workflows.v1beta.ListWorkflowsResponse} ListWorkflowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -1177,7 +3138,7 @@ /** * Verifies a ListWorkflowsResponse message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -1189,7 +3150,7 @@ if (!Array.isArray(message.workflows)) return "workflows: array expected"; for (var i = 0; i < message.workflows.length; ++i) { - var error = $root.google.cloud.workflows.v1alpha1.Workflow.verify(message.workflows[i]); + var error = $root.google.cloud.workflows.v1beta.Workflow.verify(message.workflows[i]); if (error) return "workflows." + error; } @@ -1210,30 +3171,30 @@ /** * Creates a ListWorkflowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} ListWorkflowsResponse + * @returns {google.cloud.workflows.v1beta.ListWorkflowsResponse} ListWorkflowsResponse */ ListWorkflowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.ListWorkflowsResponse) + if (object instanceof $root.google.cloud.workflows.v1beta.ListWorkflowsResponse) return object; - var message = new $root.google.cloud.workflows.v1alpha1.ListWorkflowsResponse(); + var message = new $root.google.cloud.workflows.v1beta.ListWorkflowsResponse(); if (object.workflows) { if (!Array.isArray(object.workflows)) - throw TypeError(".google.cloud.workflows.v1alpha1.ListWorkflowsResponse.workflows: array expected"); + throw TypeError(".google.cloud.workflows.v1beta.ListWorkflowsResponse.workflows: array expected"); message.workflows = []; for (var i = 0; i < object.workflows.length; ++i) { if (typeof object.workflows[i] !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.ListWorkflowsResponse.workflows: object expected"); - message.workflows[i] = $root.google.cloud.workflows.v1alpha1.Workflow.fromObject(object.workflows[i]); + throw TypeError(".google.cloud.workflows.v1beta.ListWorkflowsResponse.workflows: object expected"); + message.workflows[i] = $root.google.cloud.workflows.v1beta.Workflow.fromObject(object.workflows[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); if (object.unreachable) { if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.workflows.v1alpha1.ListWorkflowsResponse.unreachable: array expected"); + throw TypeError(".google.cloud.workflows.v1beta.ListWorkflowsResponse.unreachable: array expected"); message.unreachable = []; for (var i = 0; i < object.unreachable.length; ++i) message.unreachable[i] = String(object.unreachable[i]); @@ -1244,9 +3205,9 @@ /** * Creates a plain object from a ListWorkflowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @static - * @param {google.cloud.workflows.v1alpha1.ListWorkflowsResponse} message ListWorkflowsResponse + * @param {google.cloud.workflows.v1beta.ListWorkflowsResponse} message ListWorkflowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -1263,7 +3224,7 @@ if (message.workflows && message.workflows.length) { object.workflows = []; for (var j = 0; j < message.workflows.length; ++j) - object.workflows[j] = $root.google.cloud.workflows.v1alpha1.Workflow.toObject(message.workflows[j], options); + object.workflows[j] = $root.google.cloud.workflows.v1beta.Workflow.toObject(message.workflows[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -1278,7 +3239,7 @@ /** * Converts this ListWorkflowsResponse to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.ListWorkflowsResponse + * @memberof google.cloud.workflows.v1beta.ListWorkflowsResponse * @instance * @returns {Object.} JSON object */ @@ -1289,22 +3250,22 @@ return ListWorkflowsResponse; })(); - v1alpha1.GetWorkflowRequest = (function() { + v1beta.GetWorkflowRequest = (function() { /** * Properties of a GetWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IGetWorkflowRequest * @property {string|null} [name] GetWorkflowRequest name */ /** * Constructs a new GetWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a GetWorkflowRequest. * @implements IGetWorkflowRequest * @constructor - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest=} [properties] Properties to set */ function GetWorkflowRequest(properties) { if (properties) @@ -1316,7 +3277,7 @@ /** * GetWorkflowRequest name. * @member {string} name - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @instance */ GetWorkflowRequest.prototype.name = ""; @@ -1324,38 +3285,38 @@ /** * Creates a new GetWorkflowRequest instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.GetWorkflowRequest} GetWorkflowRequest instance + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.GetWorkflowRequest} GetWorkflowRequest instance */ GetWorkflowRequest.create = function create(properties) { return new GetWorkflowRequest(properties); }; /** - * Encodes the specified GetWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.GetWorkflowRequest.verify|verify} messages. + * Encodes the specified GetWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.GetWorkflowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest} message GetWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest} message GetWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GetWorkflowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GetWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.GetWorkflowRequest.verify|verify} messages. + * Encodes the specified GetWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.GetWorkflowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IGetWorkflowRequest} message GetWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IGetWorkflowRequest} message GetWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1366,18 +3327,18 @@ /** * Decodes a GetWorkflowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.GetWorkflowRequest} GetWorkflowRequest + * @returns {google.cloud.workflows.v1beta.GetWorkflowRequest} GetWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetWorkflowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.GetWorkflowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.GetWorkflowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1395,10 +3356,10 @@ /** * Decodes a GetWorkflowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.GetWorkflowRequest} GetWorkflowRequest + * @returns {google.cloud.workflows.v1beta.GetWorkflowRequest} GetWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -1411,7 +3372,7 @@ /** * Verifies a GetWorkflowRequest message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -1428,15 +3389,15 @@ /** * Creates a GetWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.GetWorkflowRequest} GetWorkflowRequest + * @returns {google.cloud.workflows.v1beta.GetWorkflowRequest} GetWorkflowRequest */ GetWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.GetWorkflowRequest) + if (object instanceof $root.google.cloud.workflows.v1beta.GetWorkflowRequest) return object; - var message = new $root.google.cloud.workflows.v1alpha1.GetWorkflowRequest(); + var message = new $root.google.cloud.workflows.v1beta.GetWorkflowRequest(); if (object.name != null) message.name = String(object.name); return message; @@ -1445,9 +3406,9 @@ /** * Creates a plain object from a GetWorkflowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.GetWorkflowRequest} message GetWorkflowRequest + * @param {google.cloud.workflows.v1beta.GetWorkflowRequest} message GetWorkflowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -1465,7 +3426,7 @@ /** * Converts this GetWorkflowRequest to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.GetWorkflowRequest + * @memberof google.cloud.workflows.v1beta.GetWorkflowRequest * @instance * @returns {Object.} JSON object */ @@ -1476,24 +3437,24 @@ return GetWorkflowRequest; })(); - v1alpha1.CreateWorkflowRequest = (function() { + v1beta.CreateWorkflowRequest = (function() { /** * Properties of a CreateWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface ICreateWorkflowRequest * @property {string|null} [parent] CreateWorkflowRequest parent - * @property {google.cloud.workflows.v1alpha1.IWorkflow|null} [workflow] CreateWorkflowRequest workflow + * @property {google.cloud.workflows.v1beta.IWorkflow|null} [workflow] CreateWorkflowRequest workflow * @property {string|null} [workflowId] CreateWorkflowRequest workflowId */ /** * Constructs a new CreateWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a CreateWorkflowRequest. * @implements ICreateWorkflowRequest * @constructor - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest=} [properties] Properties to set */ function CreateWorkflowRequest(properties) { if (properties) @@ -1505,15 +3466,15 @@ /** * CreateWorkflowRequest parent. * @member {string} parent - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @instance */ CreateWorkflowRequest.prototype.parent = ""; /** * CreateWorkflowRequest workflow. - * @member {google.cloud.workflows.v1alpha1.IWorkflow|null|undefined} workflow - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @member {google.cloud.workflows.v1beta.IWorkflow|null|undefined} workflow + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @instance */ CreateWorkflowRequest.prototype.workflow = null; @@ -1521,7 +3482,7 @@ /** * CreateWorkflowRequest workflowId. * @member {string} workflowId - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @instance */ CreateWorkflowRequest.prototype.workflowId = ""; @@ -1529,42 +3490,42 @@ /** * Creates a new CreateWorkflowRequest instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.CreateWorkflowRequest} CreateWorkflowRequest instance + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.CreateWorkflowRequest} CreateWorkflowRequest instance */ CreateWorkflowRequest.create = function create(properties) { return new CreateWorkflowRequest(properties); }; /** - * Encodes the specified CreateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.CreateWorkflowRequest.verify|verify} messages. + * Encodes the specified CreateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.CreateWorkflowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest} message CreateWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest} message CreateWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CreateWorkflowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.workflow != null && message.hasOwnProperty("workflow")) - $root.google.cloud.workflows.v1alpha1.Workflow.encode(message.workflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.workflowId != null && message.hasOwnProperty("workflowId")) + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + $root.google.cloud.workflows.v1beta.Workflow.encode(message.workflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workflowId != null && Object.hasOwnProperty.call(message, "workflowId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.workflowId); return writer; }; /** - * Encodes the specified CreateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.CreateWorkflowRequest.verify|verify} messages. + * Encodes the specified CreateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.CreateWorkflowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.ICreateWorkflowRequest} message CreateWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.ICreateWorkflowRequest} message CreateWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1575,18 +3536,18 @@ /** * Decodes a CreateWorkflowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.CreateWorkflowRequest} CreateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.CreateWorkflowRequest} CreateWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CreateWorkflowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.CreateWorkflowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.CreateWorkflowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1594,7 +3555,7 @@ message.parent = reader.string(); break; case 2: - message.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.decode(reader, reader.uint32()); + message.workflow = $root.google.cloud.workflows.v1beta.Workflow.decode(reader, reader.uint32()); break; case 3: message.workflowId = reader.string(); @@ -1610,10 +3571,10 @@ /** * Decodes a CreateWorkflowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.CreateWorkflowRequest} CreateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.CreateWorkflowRequest} CreateWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -1626,7 +3587,7 @@ /** * Verifies a CreateWorkflowRequest message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -1638,7 +3599,7 @@ if (!$util.isString(message.parent)) return "parent: string expected"; if (message.workflow != null && message.hasOwnProperty("workflow")) { - var error = $root.google.cloud.workflows.v1alpha1.Workflow.verify(message.workflow); + var error = $root.google.cloud.workflows.v1beta.Workflow.verify(message.workflow); if (error) return "workflow." + error; } @@ -1651,21 +3612,21 @@ /** * Creates a CreateWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.CreateWorkflowRequest} CreateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.CreateWorkflowRequest} CreateWorkflowRequest */ CreateWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.CreateWorkflowRequest) + if (object instanceof $root.google.cloud.workflows.v1beta.CreateWorkflowRequest) return object; - var message = new $root.google.cloud.workflows.v1alpha1.CreateWorkflowRequest(); + var message = new $root.google.cloud.workflows.v1beta.CreateWorkflowRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.workflow != null) { if (typeof object.workflow !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.CreateWorkflowRequest.workflow: object expected"); - message.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.fromObject(object.workflow); + throw TypeError(".google.cloud.workflows.v1beta.CreateWorkflowRequest.workflow: object expected"); + message.workflow = $root.google.cloud.workflows.v1beta.Workflow.fromObject(object.workflow); } if (object.workflowId != null) message.workflowId = String(object.workflowId); @@ -1675,9 +3636,9 @@ /** * Creates a plain object from a CreateWorkflowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.CreateWorkflowRequest} message CreateWorkflowRequest + * @param {google.cloud.workflows.v1beta.CreateWorkflowRequest} message CreateWorkflowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -1693,7 +3654,7 @@ if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.toObject(message.workflow, options); + object.workflow = $root.google.cloud.workflows.v1beta.Workflow.toObject(message.workflow, options); if (message.workflowId != null && message.hasOwnProperty("workflowId")) object.workflowId = message.workflowId; return object; @@ -1702,7 +3663,7 @@ /** * Converts this CreateWorkflowRequest to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.CreateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.CreateWorkflowRequest * @instance * @returns {Object.} JSON object */ @@ -1713,22 +3674,22 @@ return CreateWorkflowRequest; })(); - v1alpha1.DeleteWorkflowRequest = (function() { + v1beta.DeleteWorkflowRequest = (function() { /** * Properties of a DeleteWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IDeleteWorkflowRequest * @property {string|null} [name] DeleteWorkflowRequest name */ /** * Constructs a new DeleteWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents a DeleteWorkflowRequest. * @implements IDeleteWorkflowRequest * @constructor - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest=} [properties] Properties to set */ function DeleteWorkflowRequest(properties) { if (properties) @@ -1740,7 +3701,7 @@ /** * DeleteWorkflowRequest name. * @member {string} name - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @instance */ DeleteWorkflowRequest.prototype.name = ""; @@ -1748,38 +3709,38 @@ /** * Creates a new DeleteWorkflowRequest instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.DeleteWorkflowRequest} DeleteWorkflowRequest instance + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.DeleteWorkflowRequest} DeleteWorkflowRequest instance */ DeleteWorkflowRequest.create = function create(properties) { return new DeleteWorkflowRequest(properties); }; /** - * Encodes the specified DeleteWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.DeleteWorkflowRequest.verify|verify} messages. + * Encodes the specified DeleteWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.DeleteWorkflowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest} message DeleteWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest} message DeleteWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ DeleteWorkflowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeleteWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.DeleteWorkflowRequest.verify|verify} messages. + * Encodes the specified DeleteWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.DeleteWorkflowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest} message DeleteWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IDeleteWorkflowRequest} message DeleteWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1790,18 +3751,18 @@ /** * Decodes a DeleteWorkflowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.DeleteWorkflowRequest} DeleteWorkflowRequest + * @returns {google.cloud.workflows.v1beta.DeleteWorkflowRequest} DeleteWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DeleteWorkflowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.DeleteWorkflowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.DeleteWorkflowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1819,10 +3780,10 @@ /** * Decodes a DeleteWorkflowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.DeleteWorkflowRequest} DeleteWorkflowRequest + * @returns {google.cloud.workflows.v1beta.DeleteWorkflowRequest} DeleteWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -1835,7 +3796,7 @@ /** * Verifies a DeleteWorkflowRequest message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -1852,15 +3813,15 @@ /** * Creates a DeleteWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.DeleteWorkflowRequest} DeleteWorkflowRequest + * @returns {google.cloud.workflows.v1beta.DeleteWorkflowRequest} DeleteWorkflowRequest */ DeleteWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.DeleteWorkflowRequest) + if (object instanceof $root.google.cloud.workflows.v1beta.DeleteWorkflowRequest) return object; - var message = new $root.google.cloud.workflows.v1alpha1.DeleteWorkflowRequest(); + var message = new $root.google.cloud.workflows.v1beta.DeleteWorkflowRequest(); if (object.name != null) message.name = String(object.name); return message; @@ -1869,9 +3830,9 @@ /** * Creates a plain object from a DeleteWorkflowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.DeleteWorkflowRequest} message DeleteWorkflowRequest + * @param {google.cloud.workflows.v1beta.DeleteWorkflowRequest} message DeleteWorkflowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -1889,7 +3850,7 @@ /** * Converts this DeleteWorkflowRequest to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.DeleteWorkflowRequest + * @memberof google.cloud.workflows.v1beta.DeleteWorkflowRequest * @instance * @returns {Object.} JSON object */ @@ -1900,23 +3861,23 @@ return DeleteWorkflowRequest; })(); - v1alpha1.UpdateWorkflowRequest = (function() { + v1beta.UpdateWorkflowRequest = (function() { /** * Properties of an UpdateWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @interface IUpdateWorkflowRequest - * @property {google.cloud.workflows.v1alpha1.IWorkflow|null} [workflow] UpdateWorkflowRequest workflow + * @property {google.cloud.workflows.v1beta.IWorkflow|null} [workflow] UpdateWorkflowRequest workflow * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWorkflowRequest updateMask */ /** * Constructs a new UpdateWorkflowRequest. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents an UpdateWorkflowRequest. * @implements IUpdateWorkflowRequest * @constructor - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest=} [properties] Properties to set */ function UpdateWorkflowRequest(properties) { if (properties) @@ -1927,8 +3888,8 @@ /** * UpdateWorkflowRequest workflow. - * @member {google.cloud.workflows.v1alpha1.IWorkflow|null|undefined} workflow - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @member {google.cloud.workflows.v1beta.IWorkflow|null|undefined} workflow + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @instance */ UpdateWorkflowRequest.prototype.workflow = null; @@ -1936,7 +3897,7 @@ /** * UpdateWorkflowRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @instance */ UpdateWorkflowRequest.prototype.updateMask = null; @@ -1944,40 +3905,40 @@ /** * Creates a new UpdateWorkflowRequest instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.UpdateWorkflowRequest} UpdateWorkflowRequest instance + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.UpdateWorkflowRequest} UpdateWorkflowRequest instance */ UpdateWorkflowRequest.create = function create(properties) { return new UpdateWorkflowRequest(properties); }; /** - * Encodes the specified UpdateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.verify|verify} messages. + * Encodes the specified UpdateWorkflowRequest message. Does not implicitly {@link google.cloud.workflows.v1beta.UpdateWorkflowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest} message UpdateWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest} message UpdateWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UpdateWorkflowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.workflow != null && message.hasOwnProperty("workflow")) - $root.google.cloud.workflows.v1alpha1.Workflow.encode(message.workflow, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + $root.google.cloud.workflows.v1beta.Workflow.encode(message.workflow, 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 UpdateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.verify|verify} messages. + * Encodes the specified UpdateWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.UpdateWorkflowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest} message UpdateWorkflowRequest message or plain object to encode + * @param {google.cloud.workflows.v1beta.IUpdateWorkflowRequest} message UpdateWorkflowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -1988,23 +3949,23 @@ /** * Decodes an UpdateWorkflowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.UpdateWorkflowRequest} UpdateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.UpdateWorkflowRequest} UpdateWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UpdateWorkflowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1alpha1.UpdateWorkflowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.UpdateWorkflowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.decode(reader, reader.uint32()); + message.workflow = $root.google.cloud.workflows.v1beta.Workflow.decode(reader, reader.uint32()); break; case 2: message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); @@ -2020,10 +3981,10 @@ /** * Decodes an UpdateWorkflowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.UpdateWorkflowRequest} UpdateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.UpdateWorkflowRequest} UpdateWorkflowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -2036,7 +3997,7 @@ /** * Verifies an UpdateWorkflowRequest message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -2045,7 +4006,7 @@ if (typeof message !== "object" || message === null) return "object expected"; if (message.workflow != null && message.hasOwnProperty("workflow")) { - var error = $root.google.cloud.workflows.v1alpha1.Workflow.verify(message.workflow); + var error = $root.google.cloud.workflows.v1beta.Workflow.verify(message.workflow); if (error) return "workflow." + error; } @@ -2060,23 +4021,23 @@ /** * Creates an UpdateWorkflowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.UpdateWorkflowRequest} UpdateWorkflowRequest + * @returns {google.cloud.workflows.v1beta.UpdateWorkflowRequest} UpdateWorkflowRequest */ UpdateWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.UpdateWorkflowRequest) + if (object instanceof $root.google.cloud.workflows.v1beta.UpdateWorkflowRequest) return object; - var message = new $root.google.cloud.workflows.v1alpha1.UpdateWorkflowRequest(); + var message = new $root.google.cloud.workflows.v1beta.UpdateWorkflowRequest(); if (object.workflow != null) { if (typeof object.workflow !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.workflow: object expected"); - message.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.fromObject(object.workflow); + throw TypeError(".google.cloud.workflows.v1beta.UpdateWorkflowRequest.workflow: object expected"); + message.workflow = $root.google.cloud.workflows.v1beta.Workflow.fromObject(object.workflow); } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.UpdateWorkflowRequest.updateMask: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.UpdateWorkflowRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; @@ -2085,9 +4046,9 @@ /** * Creates a plain object from an UpdateWorkflowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @static - * @param {google.cloud.workflows.v1alpha1.UpdateWorkflowRequest} message UpdateWorkflowRequest + * @param {google.cloud.workflows.v1beta.UpdateWorkflowRequest} message UpdateWorkflowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -2100,7 +4061,7 @@ object.updateMask = null; } if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = $root.google.cloud.workflows.v1alpha1.Workflow.toObject(message.workflow, options); + object.workflow = $root.google.cloud.workflows.v1beta.Workflow.toObject(message.workflow, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; @@ -2109,7 +4070,7 @@ /** * Converts this UpdateWorkflowRequest to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.UpdateWorkflowRequest + * @memberof google.cloud.workflows.v1beta.UpdateWorkflowRequest * @instance * @returns {Object.} JSON object */ @@ -2120,28 +4081,26 @@ return UpdateWorkflowRequest; })(); - v1alpha1.OperationMetadata = (function() { + v1beta.OperationMetadata = (function() { /** * Properties of an OperationMetadata. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @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} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** * Constructs a new OperationMetadata. - * @memberof google.cloud.workflows.v1alpha1 + * @memberof google.cloud.workflows.v1beta * @classdesc Represents an OperationMetadata. * @implements IOperationMetadata * @constructor - * @param {google.cloud.workflows.v1alpha1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.workflows.v1beta.IOperationMetadata=} [properties] Properties to set */ function OperationMetadata(properties) { if (properties) @@ -2153,7 +4112,7 @@ /** * OperationMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance */ OperationMetadata.prototype.createTime = null; @@ -2161,7 +4120,7 @@ /** * OperationMetadata endTime. * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance */ OperationMetadata.prototype.endTime = null; @@ -2169,7 +4128,7 @@ /** * OperationMetadata target. * @member {string} target - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance */ OperationMetadata.prototype.target = ""; @@ -2177,31 +4136,15 @@ /** * OperationMetadata verb. * @member {string} verb - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance */ OperationMetadata.prototype.verb = ""; - /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusDetail = ""; - - /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.cancelRequested = false; - /** * OperationMetadata apiVersion. * @member {string} apiVersion - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance */ OperationMetadata.prototype.apiVersion = ""; @@ -2209,50 +4152,46 @@ /** * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static - * @param {google.cloud.workflows.v1alpha1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.workflows.v1alpha1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.workflows.v1beta.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.workflows.v1beta.OperationMetadata} OperationMetadata instance */ OperationMetadata.create = function create(properties) { return new OperationMetadata(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.workflows.v1alpha1.OperationMetadata.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.workflows.v1beta.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static - * @param {google.cloud.workflows.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.workflows.v1beta.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 && message.hasOwnProperty("createTime")) + 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 && message.hasOwnProperty("endTime")) + 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 && message.hasOwnProperty("target")) + if (message.target != null && Object.hasOwnProperty.call(message, "target")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && message.hasOwnProperty("verb")) + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.apiVersion); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.workflows.v1alpha1.OperationMetadata.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.workflows.v1beta.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static - * @param {google.cloud.workflows.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.workflows.v1beta.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -2263,18 +4202,18 @@ /** * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.workflows.v1alpha1.OperationMetadata} OperationMetadata + * @returns {google.cloud.workflows.v1beta.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.workflows.v1alpha1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1beta.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -2291,12 +4230,6 @@ message.verb = reader.string(); break; case 5: - message.statusDetail = reader.string(); - break; - case 6: - message.cancelRequested = reader.bool(); - break; - case 7: message.apiVersion = reader.string(); break; default: @@ -2310,10 +4243,10 @@ /** * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.workflows.v1alpha1.OperationMetadata} OperationMetadata + * @returns {google.cloud.workflows.v1beta.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -2326,7 +4259,7 @@ /** * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -2350,12 +4283,6 @@ if (message.verb != null && message.hasOwnProperty("verb")) if (!$util.isString(message.verb)) return "verb: string expected"; - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) if (!$util.isString(message.apiVersion)) return "apiVersion: string expected"; @@ -2365,33 +4292,29 @@ /** * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.workflows.v1alpha1.OperationMetadata} OperationMetadata + * @returns {google.cloud.workflows.v1beta.OperationMetadata} OperationMetadata */ OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.workflows.v1alpha1.OperationMetadata) + if (object instanceof $root.google.cloud.workflows.v1beta.OperationMetadata) return object; - var message = new $root.google.cloud.workflows.v1alpha1.OperationMetadata(); + var message = new $root.google.cloud.workflows.v1beta.OperationMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.workflows.v1alpha1.OperationMetadata.createTime: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.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.workflows.v1alpha1.OperationMetadata.endTime: object expected"); + throw TypeError(".google.cloud.workflows.v1beta.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); if (object.apiVersion != null) message.apiVersion = String(object.apiVersion); return message; @@ -2400,9 +4323,9 @@ /** * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @static - * @param {google.cloud.workflows.v1alpha1.OperationMetadata} message OperationMetadata + * @param {google.cloud.workflows.v1beta.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -2415,8 +4338,6 @@ object.endTime = null; object.target = ""; object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = false; object.apiVersion = ""; } if (message.createTime != null && message.hasOwnProperty("createTime")) @@ -2427,10 +4348,6 @@ object.target = message.target; if (message.verb != null && message.hasOwnProperty("verb")) object.verb = message.verb; - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) object.apiVersion = message.apiVersion; return object; @@ -2439,7 +4356,7 @@ /** * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.workflows.v1alpha1.OperationMetadata + * @memberof google.cloud.workflows.v1beta.OperationMetadata * @instance * @returns {Object.} JSON object */ @@ -2450,7 +4367,7 @@ return OperationMetadata; })(); - return v1alpha1; + return v1beta; })(); return workflows; @@ -2537,7 +4454,7 @@ 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 && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -2851,26 +4768,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) + if (message.get != null && Object.hasOwnProperty.call(message, "get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) + if (message.put != null && Object.hasOwnProperty.call(message, "put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) + if (message.post != null && Object.hasOwnProperty.call(message, "post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) + 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 && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -3227,9 +5144,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -3375,7 +5292,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {string} + * @enum {number} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -3496,18 +5413,18 @@ ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + 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 && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(message, "history")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; @@ -3727,7 +5644,7 @@ /** * History enum. * @name google.api.ResourceDescriptor.History - * @enum {string} + * @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 @@ -3808,9 +5725,9 @@ ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; @@ -4335,9 +6252,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) + 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) @@ -4354,9 +6271,9 @@ 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 && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("sourceCodeInfo")) + 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) @@ -4364,7 +6281,7 @@ 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 && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -4902,7 +6819,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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) @@ -4919,7 +6836,7 @@ 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 && message.hasOwnProperty("options")) + 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) @@ -5384,11 +7301,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -5612,9 +7529,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -5984,6 +7901,7 @@ * @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 */ /** @@ -6081,6 +7999,14 @@ */ 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 @@ -6105,26 +8031,28 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + 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; }; @@ -6189,6 +8117,9 @@ 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; @@ -6283,6 +8214,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -6405,6 +8339,8 @@ 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; }; @@ -6432,6 +8368,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6453,6 +8390,8 @@ 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; }; @@ -6470,7 +8409,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} + * @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 @@ -6516,7 +8455,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} + * @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 @@ -6597,9 +8536,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -6842,12 +8781,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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) @@ -7150,9 +9089,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -7372,11 +9311,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -7610,12 +9549,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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; }; @@ -7895,17 +9834,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -8246,7 +10185,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -8344,45 +10283,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + 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) @@ -8732,7 +10671,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; @@ -8809,7 +10748,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} + * @enum {number} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -8927,18 +10866,18 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + 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 && message.hasOwnProperty(".google.api.resource")) + 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; }; @@ -9280,17 +11219,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -9301,7 +11240,7 @@ writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + 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; }; @@ -9637,7 +11576,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -9653,7 +11592,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {string} + * @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 @@ -9952,9 +11891,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -10197,7 +12136,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -10446,14 +12385,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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 && message.hasOwnProperty(".google.api.defaultHost")) + 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 && message.hasOwnProperty(".google.api.oauthScopes")) + 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; }; @@ -10741,19 +12680,19 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + 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 && message.hasOwnProperty(".google.longrunning.operationInfo")) + 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 && message.hasOwnProperty(".google.api.http")) + 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; }; @@ -11003,7 +12942,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} + * @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 @@ -11133,17 +13072,17 @@ 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 && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -11920,9 +13859,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + 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) @@ -12453,11 +14392,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -12645,25 +14584,25 @@ return GeneratedCodeInfo; })(); - protobuf.Any = (function() { + protobuf.Timestamp = (function() { /** - * Properties of an Any. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Any. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Any(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12671,88 +14610,88 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.type_url = ""; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - Any.prototype.value = $util.newBuffer([]); + Timestamp.prototype.nanos = 0; /** - * Creates a new Any instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Any.create = function create(properties) { - return new Any(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any 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 */ - Any.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.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.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IAny} message Any 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 */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.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.Any(); + 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.type_url = reader.string(); + message.seconds = reader.int64(); break; case 2: - message.value = reader.bytes(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -12763,119 +14702,343 @@ }; /** - * Decodes an Any 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.Any + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Timestamp.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.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 Any 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.Any + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Timestamp} Timestamp */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) 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) - message.value = object.value; + 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 an Any 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.Any + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Timestamp.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 ($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.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; + 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 Any to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return Timestamp; })(); - protobuf.Duration = (function() { + protobuf.Any = (function() { /** - * Properties of a Duration. + * Properties of an Any. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Duration. + * 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) + 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); + }; + + 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 @@ -12929,9 +15092,9 @@ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -13451,230 +15614,6 @@ 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 && message.hasOwnProperty("seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("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); - }; - - return Timestamp; - })(); - return protobuf; })(); @@ -13993,15 +15932,15 @@ Operation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && message.hasOwnProperty("metadata")) + 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 && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && message.hasOwnProperty("error")) + 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 && message.hasOwnProperty("response")) + 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; }; @@ -14261,7 +16200,7 @@ GetOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -14475,13 +16414,13 @@ ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -14715,7 +16654,7 @@ 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 && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -14933,7 +16872,7 @@ CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -15120,7 +17059,7 @@ DeleteOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -15316,9 +17255,9 @@ WaitOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && message.hasOwnProperty("timeout")) + 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; }; @@ -15531,9 +17470,9 @@ OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); return writer; }; @@ -15763,9 +17702,9 @@ Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && message.hasOwnProperty("message")) + 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) diff --git a/protos/protos.json b/protos/protos.json index 08ef50b..bd80553 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -6,9 +6,251 @@ "nested": { "workflows": { "nested": { - "v1alpha1": { + "executions": { + "nested": { + "v1beta": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/workflows/executions/v1beta;executions", + "java_multiple_files": true, + "java_outer_classname": "ExecutionsProto", + "java_package": "com.google.cloud.workflows.executions.v1beta", + "(google.api.resource_definition).type": "workflows.googleapis.com/Workflow", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" + }, + "nested": { + "Executions": { + "options": { + "(google.api.default_host)": "workflowexecutions.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListExecutions": { + "requestType": "ListExecutionsRequest", + "responseType": "ListExecutionsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/workflows/*}/executions", + "(google.api.method_signature)": "parent" + } + }, + "CreateExecution": { + "requestType": "CreateExecutionRequest", + "responseType": "Execution", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/workflows/*}/executions", + "(google.api.http).body": "execution", + "(google.api.method_signature)": "parent,execution" + } + }, + "GetExecution": { + "requestType": "GetExecutionRequest", + "responseType": "Execution", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}", + "(google.api.method_signature)": "name" + } + }, + "CancelExecution": { + "requestType": "CancelExecutionRequest", + "responseType": "Execution", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + } + } + } + }, + "Execution": { + "options": { + "(google.api.resource).type": "workflowexecutions.googleapis.com/Execution", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "argument": { + "type": "string", + "id": 5 + }, + "result": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "error": { + "type": "Error", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workflowRevisionId": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Error": { + "fields": { + "payload": { + "type": "string", + "id": 1 + }, + "context": { + "type": "string", + "id": 2 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + } + } + }, + "ListExecutionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "workflows.googleapis.com/Workflow" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "view": { + "type": "ExecutionView", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListExecutionsResponse": { + "fields": { + "executions": { + "rule": "repeated", + "type": "Execution", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateExecutionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "workflows.googleapis.com/Workflow" + } + }, + "execution": { + "type": "Execution", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetExecutionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "workflowexecutions.googleapis.com/Execution" + } + }, + "view": { + "type": "ExecutionView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CancelExecutionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "workflowexecutions.googleapis.com/Execution" + } + } + } + }, + "ExecutionView": { + "values": { + "EXECUTION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + } + } + } + } + }, + "v1beta": { "options": { - "go_package": "google.golang.org/genproto/googleapis/cloud/workflows/v1alpha1;workflows" + "go_package": "google.golang.org/genproto/googleapis/cloud/workflows/v1beta;workflows", + "java_multiple_files": true, + "java_outer_classname": "WorkflowsProto", + "java_package": "com.google.cloud.workflows.v1beta" }, "nested": { "Workflows": { @@ -21,14 +263,15 @@ "requestType": "ListWorkflowsRequest", "responseType": "ListWorkflowsResponse", "options": { - "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*}/workflows" + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/workflows", + "(google.api.method_signature)": "parent" } }, "GetWorkflow": { "requestType": "GetWorkflowRequest", "responseType": "Workflow", "options": { - "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/workflows/*}", + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/workflows/*}", "(google.api.method_signature)": "name" } }, @@ -36,8 +279,9 @@ "requestType": "CreateWorkflowRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/workflows", + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/workflows", "(google.api.http).body": "workflow", + "(google.api.method_signature)": "parent,workflow,workflow_id", "(google.longrunning.operation_info).response_type": "Workflow", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } @@ -46,7 +290,7 @@ "requestType": "DeleteWorkflowRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/workflows/*}", + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/workflows/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" @@ -56,8 +300,9 @@ "requestType": "UpdateWorkflowRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).patch": "/v1alpha1/{workflow.name=projects/*/locations/*/workflows/*}", + "(google.api.http).patch": "/v1beta/{workflow.name=projects/*/locations/*/workflows/*}", "(google.api.http).body": "workflow", + "(google.api.method_signature)": "workflow,update_mask", "(google.longrunning.operation_info).response_type": "Workflow", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } @@ -85,32 +330,35 @@ "type": "string", "id": 2 }, - "sourceContents": { - "type": "string", - "id": 3 - }, "state": { "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionId": { + "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "versionId": { - "type": "int64", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "createTime": { + "updateTime": { "type": "google.protobuf.Timestamp", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "updateTime": { + "revisionCreateTime": { "type": "google.protobuf.Timestamp", "id": 7, "options": { @@ -125,16 +373,17 @@ "serviceAccount": { "type": "string", "id": 9 + }, + "sourceContents": { + "type": "string", + "id": 10 } }, "nested": { "State": { "values": { "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "FAILED": 2, - "DEPLOYING": 3, - "DELETING": 4 + "ACTIVE": 1 } } } @@ -268,17 +517,9 @@ "type": "string", "id": 4 }, - "statusDetail": { - "type": "string", - "id": 5 - }, - "cancelRequested": { - "type": "bool", - "id": 6 - }, "apiVersion": { "type": "string", - "id": 7 + "id": 5 } } } @@ -708,6 +949,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -943,7 +1188,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { @@ -1376,6 +1621,18 @@ } } }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Any": { "fields": { "type_url": { @@ -1411,18 +1668,6 @@ "id": 1 } } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } } } }, @@ -1443,26 +1688,32 @@ "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.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.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.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" } }, "CancelOperation": { @@ -1470,7 +1721,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" } }, "WaitOperation": { @@ -1596,6 +1848,7 @@ }, "rpc": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", "java_multiple_files": true, "java_outer_classname": "StatusProto", diff --git a/samples/README.md b/samples/README.md new file mode 100644 index 0000000..032f9b2 --- /dev/null +++ b/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 + +# [Workflows: Node.js Samples](https://github.com/googleapis/nodejs-workflows) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Create-execution](#create-execution) + * [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/nodejs-workflows#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Create-execution + +View the [source code](https://github.com/googleapis/nodejs-workflows/blob/master/samples/create-execution.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-workflows&page=editor&open_in_editor=samples/create-execution.js,samples/README.md) + +__Usage:__ + + +`node samples/create-execution.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-workflows/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-workflows&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node 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/nodejs-workflows&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/workflows/docs/ diff --git a/samples/create-execution.js b/samples/create-execution.js new file mode 100644 index 0000000..799d3e7 --- /dev/null +++ b/samples/create-execution.js @@ -0,0 +1,41 @@ +// Copyright 2020 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. + +'use strict'; + +async function main(projectId, location, name) { + // [START workflows_create_execution] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + // const projectId = 'my-project'; + // const location = 'us-central1'; + // const name = 'my-test-workflow'; + const {ExecutionsClient} = require('@google-cloud/workflows'); + const client = new ExecutionsClient(); + async function createExecution() { + const [resp] = await client.createExecution({ + parent: client.workflowPath(projectId, location, name), + }); + console.info(`name: ${resp.name}`); + } + createExecution(); + // [END workflows_create_execution] +} + +process.on('unhandledRejection', (err) => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/package.json b/samples/package.json new file mode 100644 index 0000000..d368baa --- /dev/null +++ b/samples/package.json @@ -0,0 +1,22 @@ +{ + "name": "nodejs-workflows-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/workflows": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.3.0", + "mocha": "^8.1.1" + } +} diff --git a/samples/quickstart.js b/samples/quickstart.js new file mode 100644 index 0000000..90be4de --- /dev/null +++ b/samples/quickstart.js @@ -0,0 +1,42 @@ +// Copyright 2020 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. + +'use strict'; + +async function main(projectId, location) { + // [START workflows_quickstart] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + // const projectId = 'my-project'; + // const location = 'us-central1'; + const {WorkflowsClient} = require('@google-cloud/workflows'); + const client = new WorkflowsClient(); + async function listWorkflows() { + const [workflows] = await client.listWorkflows({ + parent: client.locationPath(projectId, location), + }); + for (const workflow of workflows) { + console.info(`name: ${workflow.name}`); + } + } + listWorkflows(); + // [END workflows_quickstart] +} + +process.on('unhandledRejection', (err) => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/test/create-execution.js b/samples/test/create-execution.js new file mode 100644 index 0000000..77cc1d2 --- /dev/null +++ b/samples/test/create-execution.js @@ -0,0 +1,40 @@ +// Copyright 2020 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. + +'use strict'; + +const path = require('path'); +const assert = require('assert'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = (cmd) => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const project = process.env.GCLOUD_PROJECT; +const location = 'us-central1'; +const workflow = 'test-workflow-dont-delete'; + +describe('create-execution', () => { + it('should create an execution', async () => { + const output = execSync( + `node ./create-execution.js ${project} ${location} ${workflow}`, + { + cwd, + } + ); + assert(output.match(/name: projects.*executions.*/)); + }); +}); diff --git a/samples/test/quickstart.js b/samples/test/quickstart.js new file mode 100644 index 0000000..12d1c0a --- /dev/null +++ b/samples/test/quickstart.js @@ -0,0 +1,35 @@ +// Copyright 2020 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. + +'use strict'; + +const path = require('path'); +const assert = require('assert'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = (cmd) => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const project = process.env.GCLOUD_PROJECT; + +describe('Quickstart', () => { + it('should run quickstart', async () => { + const output = execSync(`node ./quickstart.js ${project} us-central1`, { + cwd, + }); + assert(output.match(/name: projects.*/)); + }); +}); diff --git a/src/index.ts b/src/index.ts index 6d5b7f3..8f20766 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 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,9 +16,10 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import * as v1alpha1 from './v1alpha1'; -const WorkflowsClient = v1alpha1.WorkflowsClient; -export {v1alpha1, WorkflowsClient}; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export -export default {v1alpha1, WorkflowsClient}; +import * as v1beta from './v1beta'; +const ExecutionsClient = v1beta.ExecutionsClient; +const WorkflowsClient = v1beta.WorkflowsClient; +export {v1beta, ExecutionsClient, WorkflowsClient}; +export default {v1beta, ExecutionsClient, WorkflowsClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/src/v1alpha1/workflows_client.ts b/src/v1alpha1/workflows_client.ts deleted file mode 100644 index 73ad99c..0000000 --- a/src/v1alpha1/workflows_client.ts +++ /dev/null @@ -1,897 +0,0 @@ -// 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 -// -// 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 gax from 'google-gax'; -import { - APICallback, - Callback, - CallOptions, - Descriptors, - ClientOptions, - LROperation, - PaginationCallback, - PaginationResponse, -} from 'google-gax'; -import * as path from 'path'; - -import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; -import * as gapicConfig from './workflows_client_config.json'; - -const version = require('../../../package.json').version; - -/** - * Manages workflow programs. - * @class - * @memberof v1alpha1 - */ -export class WorkflowsClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; - private _terminated = false; - auth: gax.GoogleAuth; - operationsClient: gax.OperationsClient; - workflowsStub: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of WorkflowsClient. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @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 {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. - const staticMembers = this.constructor as typeof WorkflowsClient; - const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; - - if (!opts) { - opts = {servicePath, port}; - } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - opts.clientConfig = opts.clientConfig || {}; - - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof WorkflowsClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth as gax.GoogleAuth; - - // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - workflowPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}' - ), - }; - - // 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 = { - listWorkflows: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'workflows' - ), - }; - - // 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 protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); - - this.operationsClient = gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, - }) - .operationsClient(opts); - const createWorkflowResponse = protoFilesRoot.lookup( - '.google.cloud.workflows.v1alpha1.Workflow' - ) as gax.protobuf.Type; - const createWorkflowMetadata = protoFilesRoot.lookup( - '.google.cloud.workflows.v1alpha1.OperationMetadata' - ) as gax.protobuf.Type; - const deleteWorkflowResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' - ) as gax.protobuf.Type; - const deleteWorkflowMetadata = protoFilesRoot.lookup( - '.google.cloud.workflows.v1alpha1.OperationMetadata' - ) as gax.protobuf.Type; - const updateWorkflowResponse = protoFilesRoot.lookup( - '.google.cloud.workflows.v1alpha1.Workflow' - ) as gax.protobuf.Type; - const updateWorkflowMetadata = protoFilesRoot.lookup( - '.google.cloud.workflows.v1alpha1.OperationMetadata' - ) as gax.protobuf.Type; - - this._descriptors.longrunning = { - createWorkflow: new gaxModule.LongrunningDescriptor( - this.operationsClient, - createWorkflowResponse.decode.bind(createWorkflowResponse), - createWorkflowMetadata.decode.bind(createWorkflowMetadata) - ), - deleteWorkflow: new gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteWorkflowResponse.decode.bind(deleteWorkflowResponse), - deleteWorkflowMetadata.decode.bind(deleteWorkflowMetadata) - ), - updateWorkflow: new gaxModule.LongrunningDescriptor( - this.operationsClient, - updateWorkflowResponse.decode.bind(updateWorkflowResponse), - updateWorkflowMetadata.decode.bind(updateWorkflowMetadata) - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.cloud.workflows.v1alpha1.Workflows', - 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 = {}; - - // Put together the "service stub" for - // google.cloud.workflows.v1alpha1.Workflows. - this.workflowsStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( - 'google.cloud.workflows.v1alpha1.Workflows' - ) - : // tslint:disable-next-line no-any - (protos as any).google.cloud.workflows.v1alpha1.Workflows, - opts - ) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const workflowsStubMethods = [ - 'listWorkflows', - 'getWorkflow', - 'createWorkflow', - 'deleteWorkflow', - 'updateWorkflow', - ]; - - for (const methodName of workflowsStubMethods) { - const innerCallPromise = this.workflowsStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - return stub[methodName].apply(stub, args); - }, - (err: Error | null | undefined) => () => { - throw err; - } - ); - - const apiCall = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] - ); - - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'workflows.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'workflows.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - 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. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId( - callback?: Callback - ): Promise | void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- - getWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest, - options?: gax.CallOptions - ): Promise< - [ - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - ( - | protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest - | undefined - ), - {} | undefined - ] - >; - getWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - | protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest - | undefined, - {} | undefined - > - ): void; - /** - * Gets details of a single Workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the workflow which information should be - * retrieved, for example, - * "projects/project1/locations/us-central1/workflows/workflow1". - * @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 [Workflow]{@link google.cloud.workflows.v1alpha1.Workflow}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - | protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest - | undefined, - {} | undefined - >, - callback?: Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - | protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest - | undefined, - {} | undefined - > - ): Promise< - [ - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - ( - | protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest - | undefined - ), - {} | undefined - ] - > | void { - request = request || {}; - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); - return this._innerApiCalls.getWorkflow(request, options, callback); - } - - createWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): void; - /** - * Creates a new workflow. If a workflow with the specified name already - * exists in the specified project and location, the long running operation - * will return `ALREADY_EXISTS` error. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Project and location in which the workflow should be created, for - * example "projects/project1/locations/us-central1". - * @param {google.cloud.workflows.v1alpha1.Workflow} request.workflow - * Required. Workflow to be created. - * @param {string} request.workflowId - * Required. The ID of the workflow to be created. It has to fulfil the - * following requirements: - * - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / 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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - createWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.ICreateWorkflowRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - >, - callback?: Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): Promise< - [ - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - return this._innerApiCalls.createWorkflow(request, options, callback); - } - deleteWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - deleteWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): void; - /** - * Deletes a workflow with the specified name. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the workflow which should be deleted, for example, - * "projects/project1/locations/us-central1/workflows/workflow1". - * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - deleteWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - >, - callback?: Callback< - LROperation< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): Promise< - [ - LROperation< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); - return this._innerApiCalls.deleteWorkflow(request, options, callback); - } - updateWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): void; - /** - * Updates existing workflow and increases its - * [version_id][google.cloud.workflows.v1alpha1.Workflow.version_id]. - * Has no impact on any workflow execution. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.workflows.v1alpha1.Workflow} request.workflow - * Required. Workflow to be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * List of the only fields to be updated. If not present, the entire workflow - * will be updated. - * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - updateWorkflow( - request: protosTypes.google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - >, - callback?: Callback< - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): Promise< - [ - LROperation< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow, - protosTypes.google.cloud.workflows.v1alpha1.IOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - workflow_name: request.workflow!.name || '', - }); - return this._innerApiCalls.updateWorkflow(request, options, callback); - } - listWorkflows( - request: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest, - options?: gax.CallOptions - ): Promise< - [ - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow[], - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest | null, - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsResponse - ] - >; - listWorkflows( - request: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow[], - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest | null, - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsResponse - > - ): void; - /** - * Lists Workflows in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Project and location from which the workflows should be listed, - * for example, "projects/project1/locations/us-central1". - * @param {number} request.pageSize - * Maximum number of workflows to return per call. - * @param {string} request.pageToken - * The value returned by the last - * `ListWorkflowsResponse` indicates that - * this is a continuation of a prior `ListWorkflows` call, and that the - * system should return the next page of data. - * @param {string} request.filter - * @param {string} request.orderBy - * @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 [Workflow]{@link google.cloud.workflows.v1alpha1.Workflow}. - * The client library support 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Workflow]{@link google.cloud.workflows.v1alpha1.Workflow} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListWorkflowsRequest]{@link google.cloud.workflows.v1alpha1.ListWorkflowsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListWorkflowsResponse]{@link google.cloud.workflows.v1alpha1.ListWorkflowsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - listWorkflows( - request: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow[], - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest | null, - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsResponse - >, - callback?: Callback< - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow[], - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest | null, - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsResponse - > - ): Promise< - [ - protosTypes.google.cloud.workflows.v1alpha1.IWorkflow[], - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest | null, - protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsResponse - ] - > | void { - request = request || {}; - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - return this._innerApiCalls.listWorkflows(request, options, callback); - } - - /** - * Equivalent to {@link listWorkflows}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listWorkflows} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Project and location from which the workflows should be listed, - * for example, "projects/project1/locations/us-central1". - * @param {number} request.pageSize - * Maximum number of workflows to return per call. - * @param {string} request.pageToken - * The value returned by the last - * `ListWorkflowsResponse` indicates that - * this is a continuation of a prior `ListWorkflows` call, and that the - * system should return the next page of data. - * @param {string} request.filter - * @param {string} request.orderBy - * @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 [Workflow]{@link google.cloud.workflows.v1alpha1.Workflow} on 'data' event. - */ - listWorkflowsStream( - request?: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest, - options?: gax.CallOptions | {} - ): Transform { - request = request || {}; - const callSettings = new gax.CallSettings(options); - return this._descriptors.page.listWorkflows.createStream( - this._innerApiCalls.listWorkflows as gax.GaxCall, - request, - callSettings - ); - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified workflow resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @returns {string} Resource name string. - */ - workflowPath(project: string, location: string, workflow: string) { - return this._pathTemplates.workflowPathTemplate.render({ - project, - location, - workflow, - }); - } - - /** - * Parse the project from Workflow resource. - * - * @param {string} workflowName - * A fully-qualified path representing Workflow resource. - * @returns {string} A string representing the project. - */ - matchProjectFromWorkflowName(workflowName: string) { - return this._pathTemplates.workflowPathTemplate.match(workflowName).project; - } - - /** - * Parse the location from Workflow resource. - * - * @param {string} workflowName - * A fully-qualified path representing Workflow resource. - * @returns {string} A string representing the location. - */ - matchLocationFromWorkflowName(workflowName: string) { - return this._pathTemplates.workflowPathTemplate.match(workflowName) - .location; - } - - /** - * Parse the workflow from Workflow resource. - * - * @param {string} workflowName - * A fully-qualified path representing Workflow resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromWorkflowName(workflowName: string) { - return this._pathTemplates.workflowPathTemplate.match(workflowName) - .workflow; - } - - /** - * Terminate the GRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - */ - close(): Promise { - if (!this._terminated) { - return this.workflowsStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1alpha1/workflows_proto_list.json b/src/v1alpha1/workflows_proto_list.json deleted file mode 100644 index 7f7fcfc..0000000 --- a/src/v1alpha1/workflows_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/cloud/workflows/v1alpha1/workflows.proto" -] diff --git a/src/v1beta/executions_client.ts b/src/v1beta/executions_client.ts new file mode 100644 index 0000000..ed98c1e --- /dev/null +++ b/src/v1beta/executions_client.ts @@ -0,0 +1,979 @@ +// Copyright 2020 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 gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import * as gapicConfig from './executions_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Executions is used to start and manage running instances of + * {@link google.cloud.workflows.v1beta.Workflow|Workflows} called executions. + * @class + * @memberof v1beta + */ +export class ExecutionsClient { + private _terminated = false; + private _opts: ClientOptions; + 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: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + executionsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ExecutionsClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof ExecutionsClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); + opts.clientConfig = opts.clientConfig || {}; + + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the ExecutionsClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof ExecutionsClient).scopes; + 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; + + // 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}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}' + ), + workflowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}' + ), + }; + + // 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 = { + listExecutions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'executions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.workflows.executions.v1beta.Executions', + 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 = {}; + } + + /** + * 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.executionsStub) { + return this.executionsStub; + } + + // Put together the "service stub" for + // google.cloud.workflows.executions.v1beta.Executions. + this.executionsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.workflows.executions.v1beta.Executions' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.workflows.executions.v1beta + .Executions, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const executionsStubMethods = [ + 'listExecutions', + 'createExecution', + 'getExecution', + 'cancelExecution', + ]; + for (const methodName of executionsStubMethods) { + const callPromise = this.executionsStub.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.innerApiCalls[methodName] = apiCall; + } + + return this.executionsStub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'workflowexecutions.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'workflowexecutions.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + 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. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + createExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | undefined + ), + {} | undefined + ] + >; + createExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new execution using the latest revision of the given workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * @param {google.cloud.workflows.executions.v1beta.Execution} request.execution + * Required. Execution to be created. + * @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 [Execution]{@link google.cloud.workflows.executions.v1beta.Execution}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.ICreateExecutionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createExecution(request, options, callback); + } + getExecution( + request: protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | undefined + ), + {} | undefined + ] + >; + getExecution( + request: protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getExecution( + request: protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns an execution of the given name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @param {google.cloud.workflows.executions.v1beta.ExecutionView} [request.view] + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * @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 [Execution]{@link google.cloud.workflows.executions.v1beta.Execution}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getExecution( + request: protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.IGetExecutionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getExecution(request, options, callback); + } + cancelExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | undefined + ), + {} | undefined + ] + >; + cancelExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, + callback: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Cancels an execution of the given name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @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 [Execution]{@link google.cloud.workflows.executions.v1beta.Execution}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + cancelExecution( + request: protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.workflows.executions.v1beta.IExecution, + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution, + ( + | protos.google.cloud.workflows.executions.v1beta.ICancelExecutionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelExecution(request, options, callback); + } + + listExecutions( + request: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution[], + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest | null, + protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + ] + >; + listExecutions( + request: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + | protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + | null + | undefined, + protos.google.cloud.workflows.executions.v1beta.IExecution + > + ): void; + listExecutions( + request: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + callback: PaginationCallback< + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + | protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + | null + | undefined, + protos.google.cloud.workflows.executions.v1beta.IExecution + > + ): void; + /** + * Returns a list of executions which belong to the workflow with + * the given name. The method returns executions of all workflow + * revisions. Returned executions are ordered by their start time (newest + * first). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * @param {string} request.pageToken + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * @param {google.cloud.workflows.executions.v1beta.ExecutionView} [request.view] + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * @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 [Execution]{@link google.cloud.workflows.executions.v1beta.Execution}. + * The client library support 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Execution]{@link google.cloud.workflows.executions.v1beta.Execution} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListExecutionsRequest]{@link google.cloud.workflows.executions.v1beta.ListExecutionsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListExecutionsResponse]{@link google.cloud.workflows.executions.v1beta.ListExecutionsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listExecutions( + request: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + | protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + | null + | undefined, + protos.google.cloud.workflows.executions.v1beta.IExecution + >, + callback?: PaginationCallback< + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + | protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + | null + | undefined, + protos.google.cloud.workflows.executions.v1beta.IExecution + > + ): Promise< + [ + protos.google.cloud.workflows.executions.v1beta.IExecution[], + protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest | null, + protos.google.cloud.workflows.executions.v1beta.IListExecutionsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listExecutions(request, options, callback); + } + + /** + * Equivalent to {@link listExecutions}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listExecutions} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * @param {string} request.pageToken + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * @param {google.cloud.workflows.executions.v1beta.ExecutionView} [request.view] + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * @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 [Execution]{@link google.cloud.workflows.executions.v1beta.Execution} on 'data' event. + */ + listExecutionsStream( + request?: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExecutions.createStream( + this.innerApiCalls.listExecutions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listExecutions}, but 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.parent + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * @param {string} request.pageToken + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * @param {google.cloud.workflows.executions.v1beta.ExecutionView} [request.view] + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listExecutionsAsync( + request?: protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listExecutions.asyncIterate( + this.innerApiCalls['listExecutions'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.workflows.executions.v1beta.IExecution + >; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + workflow: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + 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 workflow from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .workflow; + } + + /** + * 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 workflow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @returns {string} Resource name string. + */ + workflowPath(project: string, location: string, workflow: string) { + return this.pathTemplates.workflowPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + }); + } + + /** + * Parse the project from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).project; + } + + /** + * Parse the location from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).location; + } + + /** + * Parse the workflow from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).workflow; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.executionsStub!.then((stub) => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/src/v1beta/executions_client_config.json b/src/v1beta/executions_client_config.json new file mode 100644 index 0000000..bf2692e --- /dev/null +++ b/src/v1beta/executions_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.cloud.workflows.executions.v1beta.Executions": { + "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": { + "ListExecutions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateExecution": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetExecution": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelExecution": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/v1beta/executions_proto_list.json b/src/v1beta/executions_proto_list.json new file mode 100644 index 0000000..2450667 --- /dev/null +++ b/src/v1beta/executions_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/workflows/executions/v1beta/executions.proto" +] diff --git a/src/v1alpha1/index.ts b/src/v1beta/index.ts similarity index 90% rename from src/v1alpha1/index.ts rename to src/v1beta/index.ts index 21b074d..a5d0951 100644 --- a/src/v1alpha1/index.ts +++ b/src/v1beta/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 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,4 +16,5 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +export {ExecutionsClient} from './executions_client'; export {WorkflowsClient} from './workflows_client'; diff --git a/src/v1beta/workflows_client.ts b/src/v1beta/workflows_client.ts new file mode 100644 index 0000000..c18d8c7 --- /dev/null +++ b/src/v1beta/workflows_client.ts @@ -0,0 +1,1230 @@ +// Copyright 2020 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 gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import * as gapicConfig from './workflows_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Workflows is used to deploy and execute workflow programs. + * Workflows makes sure the program executes reliably, despite hardware and + * networking interruptions. + * @class + * @memberof v1beta + */ +export class WorkflowsClient { + private _terminated = false; + private _opts: ClientOptions; + 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: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + workflowsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of WorkflowsClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof WorkflowsClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); + opts.clientConfig = opts.clientConfig || {}; + + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the WorkflowsClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof WorkflowsClient).scopes; + 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; + + // 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}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // 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}' + ), + workflowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}' + ), + }; + + // 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 = { + listWorkflows: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflows' + ), + }; + + // 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 protoFilesRoot = opts.fallback + ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createWorkflowResponse = protoFilesRoot.lookup( + '.google.cloud.workflows.v1beta.Workflow' + ) as gax.protobuf.Type; + const createWorkflowMetadata = protoFilesRoot.lookup( + '.google.cloud.workflows.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + const deleteWorkflowResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteWorkflowMetadata = protoFilesRoot.lookup( + '.google.cloud.workflows.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + const updateWorkflowResponse = protoFilesRoot.lookup( + '.google.cloud.workflows.v1beta.Workflow' + ) as gax.protobuf.Type; + const updateWorkflowMetadata = protoFilesRoot.lookup( + '.google.cloud.workflows.v1beta.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createWorkflow: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createWorkflowResponse.decode.bind(createWorkflowResponse), + createWorkflowMetadata.decode.bind(createWorkflowMetadata) + ), + deleteWorkflow: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteWorkflowResponse.decode.bind(deleteWorkflowResponse), + deleteWorkflowMetadata.decode.bind(deleteWorkflowMetadata) + ), + updateWorkflow: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateWorkflowResponse.decode.bind(updateWorkflowResponse), + updateWorkflowMetadata.decode.bind(updateWorkflowMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.workflows.v1beta.Workflows', + 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 = {}; + } + + /** + * 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.workflowsStub) { + return this.workflowsStub; + } + + // Put together the "service stub" for + // google.cloud.workflows.v1beta.Workflows. + this.workflowsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.workflows.v1beta.Workflows' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.workflows.v1beta.Workflows, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const workflowsStubMethods = [ + 'listWorkflows', + 'getWorkflow', + 'createWorkflow', + 'deleteWorkflow', + 'updateWorkflow', + ]; + for (const methodName of workflowsStubMethods) { + const callPromise = this.workflowsStub.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.innerApiCalls[methodName] = apiCall; + } + + return this.workflowsStub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'workflows.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'workflows.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + 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. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getWorkflow( + request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | undefined, + {} | undefined + ] + >; + getWorkflow( + request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.workflows.v1beta.IWorkflow, + | protos.google.cloud.workflows.v1beta.IGetWorkflowRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getWorkflow( + request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, + callback: Callback< + protos.google.cloud.workflows.v1beta.IWorkflow, + | protos.google.cloud.workflows.v1beta.IGetWorkflowRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details of a single Workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @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 [Workflow]{@link google.cloud.workflows.v1beta.Workflow}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getWorkflow( + request: protos.google.cloud.workflows.v1beta.IGetWorkflowRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.workflows.v1beta.IWorkflow, + | protos.google.cloud.workflows.v1beta.IGetWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.workflows.v1beta.IWorkflow, + | protos.google.cloud.workflows.v1beta.IGetWorkflowRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IGetWorkflowRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getWorkflow(request, options, callback); + } + + createWorkflow( + request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createWorkflow( + request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createWorkflow( + request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, + callback: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new workflow. If a workflow with the specified name already + * exists in the specified project and location, the long running operation + * will return {@link google.rpc.Code.ALREADY_EXISTS|ALREADY_EXISTS} error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * @param {google.cloud.workflows.v1beta.Workflow} request.workflow + * Required. Workflow to be created. + * @param {string} request.workflowId + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createWorkflow( + request: protos.google.cloud.workflows.v1beta.ICreateWorkflowRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createWorkflow(request, options, callback); + } + /** + * Check the status of the long running operation returned by the createWorkflow() method. + * @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. + * + * @example: + * const decodedOperation = await checkCreateWorkflowProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkCreateWorkflowProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.workflows.v1beta.Workflow, + protos.google.cloud.workflows.v1beta.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createWorkflow, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.workflows.v1beta.Workflow, + protos.google.cloud.workflows.v1beta.OperationMetadata + >; + } + deleteWorkflow( + request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteWorkflow( + request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteWorkflow( + request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a workflow with the specified name. + * This method also cancels and deletes all running executions of the + * workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteWorkflow( + request: protos.google.cloud.workflows.v1beta.IDeleteWorkflowRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteWorkflow(request, options, callback); + } + /** + * Check the status of the long running operation returned by the deleteWorkflow() method. + * @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. + * + * @example: + * const decodedOperation = await checkDeleteWorkflowProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkDeleteWorkflowProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.workflows.v1beta.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteWorkflow, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.workflows.v1beta.OperationMetadata + >; + } + updateWorkflow( + request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateWorkflow( + request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateWorkflow( + request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, + callback: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Updates an existing workflow. + * Running this method has no impact on already running executions of the + * workflow. A new revision of the workflow may be created as a result of a + * successful update operation. In that case, such revision will be used + * in new workflow executions. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.workflows.v1beta.Workflow} request.workflow + * Required. Workflow to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateWorkflow( + request: protos.google.cloud.workflows.v1beta.IUpdateWorkflowRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'workflow.name': request.workflow!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateWorkflow(request, options, callback); + } + /** + * Check the status of the long running operation returned by the updateWorkflow() method. + * @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. + * + * @example: + * const decodedOperation = await checkUpdateWorkflowProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkUpdateWorkflowProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.workflows.v1beta.Workflow, + protos.google.cloud.workflows.v1beta.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateWorkflow, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.workflows.v1beta.Workflow, + protos.google.cloud.workflows.v1beta.OperationMetadata + >; + } + listWorkflows( + request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.workflows.v1beta.IWorkflow[], + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest | null, + protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + ] + >; + listWorkflows( + request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + | protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + | null + | undefined, + protos.google.cloud.workflows.v1beta.IWorkflow + > + ): void; + listWorkflows( + request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + callback: PaginationCallback< + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + | protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + | null + | undefined, + protos.google.cloud.workflows.v1beta.IWorkflow + > + ): void; + /** + * Lists Workflows in a given project and location. + * The default order is not specified. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @param {number} request.pageSize + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * @param {string} request.filter + * Filter to restrict results to specific workflows. + * @param {string} request.orderBy + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * @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 [Workflow]{@link google.cloud.workflows.v1beta.Workflow}. + * The client library support 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Workflow]{@link google.cloud.workflows.v1beta.Workflow} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListWorkflowsRequest]{@link google.cloud.workflows.v1beta.ListWorkflowsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListWorkflowsResponse]{@link google.cloud.workflows.v1beta.ListWorkflowsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listWorkflows( + request: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + | protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + | null + | undefined, + protos.google.cloud.workflows.v1beta.IWorkflow + >, + callback?: PaginationCallback< + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + | protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + | null + | undefined, + protos.google.cloud.workflows.v1beta.IWorkflow + > + ): Promise< + [ + protos.google.cloud.workflows.v1beta.IWorkflow[], + protos.google.cloud.workflows.v1beta.IListWorkflowsRequest | null, + protos.google.cloud.workflows.v1beta.IListWorkflowsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkflows(request, options, callback); + } + + /** + * Equivalent to {@link listWorkflows}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listWorkflows} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @param {number} request.pageSize + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * @param {string} request.filter + * Filter to restrict results to specific workflows. + * @param {string} request.orderBy + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * @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 [Workflow]{@link google.cloud.workflows.v1beta.Workflow} on 'data' event. + */ + listWorkflowsStream( + request?: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listWorkflows.createStream( + this.innerApiCalls.listWorkflows as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listWorkflows}, but 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.parent + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @param {number} request.pageSize + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * @param {string} request.filter + * Filter to restrict results to specific workflows. + * @param {string} request.orderBy + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listWorkflowsAsync( + request?: protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listWorkflows.asyncIterate( + this.innerApiCalls['listWorkflows'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- 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 workflow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @returns {string} Resource name string. + */ + workflowPath(project: string, location: string, workflow: string) { + return this.pathTemplates.workflowPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + }); + } + + /** + * Parse the project from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).project; + } + + /** + * Parse the location from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).location; + } + + /** + * Parse the workflow from Workflow resource. + * + * @param {string} workflowName + * A fully-qualified path representing Workflow resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromWorkflowName(workflowName: string) { + return this.pathTemplates.workflowPathTemplate.match(workflowName).workflow; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.workflowsStub!.then((stub) => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/src/v1alpha1/workflows_client_config.json b/src/v1beta/workflows_client_config.json similarity index 95% rename from src/v1alpha1/workflows_client_config.json rename to src/v1beta/workflows_client_config.json index 2104cb7..bccc9e1 100644 --- a/src/v1alpha1/workflows_client_config.json +++ b/src/v1beta/workflows_client_config.json @@ -1,6 +1,6 @@ { "interfaces": { - "google.cloud.workflows.v1alpha1.Workflows": { + "google.cloud.workflows.v1beta.Workflows": { "retry_codes": { "non_idempotent": [], "idempotent": [ diff --git a/src/v1beta/workflows_proto_list.json b/src/v1beta/workflows_proto_list.json new file mode 100644 index 0000000..c9d0fa6 --- /dev/null +++ b/src/v1beta/workflows_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/workflows/v1beta/workflows.proto" +] diff --git a/synth.metadata b/synth.metadata index c3fa45d..4da5879 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,4671 +1,111 @@ { - "updateTime": "2020-01-04T00:54:57.530503Z", "sources": [ { "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "c7bc200d62915541e1fd3c3ff6345f92269a3251", - "internalRef": "288042994" + "name": ".", + "remote": "git@github.com:googleapis/nodejs-workflows.git", + "sha": "7444fd0907e73f4bc546a56783c70cd396a8046f" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "74bda5c755f36d6e2f82d6e18a702301582c9fab", + "internalRef": "332258539" } } ], "destinations": [ { "client": { - "source": "googleapis-private", + "source": "googleapis", + "apiName": "workflow-executions", + "apiVersion": "v1beta", + "language": "nodejs", + "generator": "bazel" + } + }, + { + "client": { + "source": "googleapis", "apiName": "workflows", - "apiVersion": "v1alpha1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "apiVersion": "v1beta", + "language": "nodejs", + "generator": "bazel" } } ], - "newFiles": [ - { - "path": "CONTRIBUTING.md" - }, - { - "path": ".prettierignore" - }, - { - "path": "package-lock.json" - }, - { - "path": ".eslintignore" - }, - { - "path": "tslint.json" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".nycrc" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "LICENSE" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "renovate.json" - }, - { - "path": ".jsdoc.js" - }, - { - "path": "tsconfig.json" - }, - { - "path": ".prettierrc" - }, - { - "path": "README.md" - }, - { - "path": "test/gapic-workflows-v1alpha1.ts" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/google/cloud/workflows/v1alpha1/workflows.proto" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": "build/test/gapic-workflows-v1alpha1.d.ts" - }, - { - "path": "build/test/gapic-workflows-v1alpha1.js.map" - }, - { - "path": "build/test/gapic-workflows-v1alpha1.js" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/google/cloud/workflows/v1alpha1/workflows.proto" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/v1alpha1/index.js" - }, - { - "path": "build/src/v1alpha1/workflows_client_config.json" - }, - { - "path": "build/src/v1alpha1/workflows_client.js.map" - }, - { - "path": "build/src/v1alpha1/workflows_client.d.ts" - }, - { - "path": "build/src/v1alpha1/workflows_client.js" - }, - { - "path": "build/src/v1alpha1/index.js.map" - }, - { - "path": "build/src/v1alpha1/index.d.ts" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1alpha1/workflows_client_config.json" - }, - { - "path": "src/v1alpha1/index.ts" - }, - { - "path": "src/v1alpha1/workflows_proto_list.json" - }, - { - "path": "src/v1alpha1/workflows_client.ts" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/yallist/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/once/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/through2/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/debug/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/fast-text-encoding/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/node-forge/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/isarray/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/agent-base/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/jwa/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/inherits/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/gtoken/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/long/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/mime/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/semver/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/retry-request/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/package-lock.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/once/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/espree/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/source-map/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/inflight/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/optionator/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/uglify-js/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/acorn/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/esutils/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/esprima/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/inherits/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/color-name/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/tmp/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/chalk/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/type-check/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/levn/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/estraverse/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/escodegen/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/minimist/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/deep-is/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/commander/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/protobufjs/cli/node_modules/glob/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/jws/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/ms/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/duplexify/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@grpc/proto-loader/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@grpc/grpc-js/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@grpc/grpc-js/node_modules/semver/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/gaxios/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/base64-js/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@types/long/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/lodash.has/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/walkdir/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/extend/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/arrify/package.json" - }, - { - "path": "node_modules/google-gax/node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/mdurl/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/catharsis/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/uc.micro/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/entities/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/argparse/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/@babel/parser/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/underscore/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/minimist/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/klaw/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/lodash/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/requizzle/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/bluebird/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/marked/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/once/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/inflight/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/inherits/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/node_modules/glob/package.json" - }, - { - "path": "node_modules/gts/package.json" - }, - { - "path": "node_modules/gts/node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/gts/node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/gts/node_modules/yallist/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/gts/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/gts/node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/gts/node_modules/once/package.json" - }, - { - "path": "node_modules/gts/node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-ansi/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/gts/node_modules/decamelize/package.json" - }, - { - "path": "node_modules/gts/node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/gts/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/gts/node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/gts/node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/gts/node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/gts/node_modules/currently-unhandled/package.json" - }, - { - "path": "node_modules/gts/node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/gts/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/gts/node_modules/pify/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/gts/node_modules/inflight/package.json" - }, - { - "path": "node_modules/gts/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/meow/package.json" - }, - { - "path": "node_modules/gts/node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-ci/package.json" - }, - { - "path": "node_modules/gts/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/gts/node_modules/ci-info/package.json" - }, - { - "path": "node_modules/gts/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/gts/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/gts/node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/gts/node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-key/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/pump/package.json" - }, - { - "path": "node_modules/gts/node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/gts/node_modules/configstore/package.json" - }, - { - "path": "node_modules/gts/node_modules/configstore/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/gts/node_modules/run-async/package.json" - }, - { - "path": "node_modules/gts/node_modules/onetime/package.json" - }, - { - "path": "node_modules/gts/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/gts/node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/gts/node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/gts/node_modules/prettier/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-promise/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslib/package.json" - }, - { - "path": "node_modules/gts/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/gts/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/gts/node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/gts/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/gts/node_modules/esutils/package.json" - }, - { - "path": "node_modules/gts/node_modules/responselike/package.json" - }, - { - "path": "node_modules/gts/node_modules/cli-width/package.json" - }, - { - "path": "node_modules/gts/node_modules/tsutils/package.json" - }, - { - "path": "node_modules/gts/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/gts/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/gts/node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/gts/node_modules/tslint-config-prettier/package.json" - }, - { - "path": "node_modules/gts/node_modules/pseudomap/package.json" - }, - { - "path": "node_modules/gts/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/gts/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/gts/node_modules/execa/package.json" - }, - { - "path": "node_modules/gts/node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/gts/node_modules/loud-rejection/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/gts/node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/gts/node_modules/esprima/package.json" - }, - { - "path": "node_modules/gts/node_modules/inherits/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/gts/node_modules/figures/package.json" - }, - { - "path": "node_modules/gts/node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/gts/node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/gts/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/gts/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/gts/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/gts/node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/gts/node_modules/isexe/package.json" - }, - { - "path": "node_modules/gts/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/gts/node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/gts/node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/gts/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/gts/node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/gts/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/gts/node_modules/p-try/package.json" - }, - { - "path": "node_modules/gts/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/gts/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/gts/node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/gts/node_modules/tmp/package.json" - }, - { - "path": "node_modules/gts/node_modules/which/package.json" - }, - { - "path": "node_modules/gts/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/error-ex/package.json" - }, - { - "path": "node_modules/gts/node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/gts/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/gts/node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/gts/node_modules/argparse/package.json" - }, - { - "path": "node_modules/gts/node_modules/chardet/package.json" - }, - { - "path": "node_modules/gts/node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/gts/node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/gts/node_modules/builtin-modules/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/gts/node_modules/rxjs/package.json" - }, - { - "path": "node_modules/gts/node_modules/semver/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/highlight/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/gts/node_modules/latest-version/package.json" - }, - { - "path": "node_modules/gts/node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/gts/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/gts/node_modules/widest-line/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/gts/node_modules/widest-line/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/gts/node_modules/widest-line/node_modules/string-width/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-parse/package.json" - }, - { - "path": "node_modules/gts/node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/gts/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/gts/node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/gts/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/gts/node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/tslint/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/gts/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/gts/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/ncp/package.json" - }, - { - "path": "node_modules/gts/node_modules/find-up/package.json" - }, - { - "path": "node_modules/gts/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/gts/node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/gts/node_modules/ini/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/inquirer/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-type/package.json" - }, - { - "path": "node_modules/gts/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/gts/node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/got/package.json" - }, - { - "path": "node_modules/gts/node_modules/got/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/gts/node_modules/minimist/package.json" - }, - { - "path": "node_modules/gts/node_modules/keyv/package.json" - }, - { - "path": "node_modules/gts/node_modules/diff/package.json" - }, - { - "path": "node_modules/gts/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/gts/node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/gts/node_modules/lodash/package.json" - }, - { - "path": "node_modules/gts/node_modules/clone-response/package.json" - }, - { - "path": "node_modules/gts/node_modules/package-json/package.json" - }, - { - "path": "node_modules/gts/node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/gts/node_modules/registry-url/package.json" - }, - { - "path": "node_modules/gts/node_modules/redent/package.json" - }, - { - "path": "node_modules/gts/node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/gts/node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/gts/node_modules/p-finally/package.json" - }, - { - "path": "node_modules/gts/node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/gts/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/gts/node_modules/term-size/package.json" - }, - { - "path": "node_modules/gts/node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/update-notifier/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/gts/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/gts/node_modules/external-editor/package.json" - }, - { - "path": "node_modules/gts/node_modules/path-is-inside/package.json" - }, - { - "path": "node_modules/gts/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/gts/node_modules/rc/package.json" - }, - { - "path": "node_modules/gts/node_modules/rc/node_modules/minimist/package.json" - }, - { - "path": "node_modules/gts/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/gts/node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/gts/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/gts/node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/gts/node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-align/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-align/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/gts/node_modules/commander/package.json" - }, - { - "path": "node_modules/gts/node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/gts/node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/gts/node_modules/resolve/package.json" - }, - { - "path": "node_modules/gts/node_modules/through/package.json" - }, - { - "path": "node_modules/gts/node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/gts/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/gts/node_modules/glob/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/color-name/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/chalk/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/gts/node_modules/boxen/node_modules/string-width/package.json" - }, - { - "path": "node_modules/gts/node_modules/arrify/package.json" - }, - { - "path": "node_modules/gts/node_modules/string-width/package.json" - }, - { - "path": "node_modules/gts/node_modules/string-width/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/copy-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/pascalcase/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/expand-brackets/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/expand-brackets/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/expand-brackets/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/atob/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/once/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/for-in/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/decamelize/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/array-unique/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/base/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/base/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/base/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/base/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/base/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/decode-uri-component/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cache-base/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/union-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/arr-union/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/debug/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/use/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-glob/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/object-copy/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/object-copy/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/object-copy/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-node/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-node/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-node/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/path-key/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/component-emitter/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/resolve-dir/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/resolve-dir/node_modules/global-modules/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/define-property/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/define-property/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/define-property/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/pump/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/expand-tilde/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-values/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-values/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/mem/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-is-promise/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/collection-visit/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/has-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/repeat-string/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/isarray/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/object.pick/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/lcid/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/errno/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/interpret/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-defer/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/pkg-dir/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/execa/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-plain-object/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/split-string/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/inherits/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/braces/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/to-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-name/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ret/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/detect-file/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/import-local/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/get-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/tapable/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extglob/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/isexe/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-util/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon-util/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/source-map-url/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/nice-try/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/assign-symbols/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-try/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/nanomatch/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/json5/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/extend-shallow/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/which/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/resolve-url/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/os-locale/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/webpack-cli/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/set-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/set-value/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/map-cache/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/urix/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/require-directory/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/prr/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/chalk/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/chalk/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/which-module/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/static-extend/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/static-extend/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/arr-diff/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ms/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/class-utils/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/class-utils/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/source-map-resolve/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-number/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/invert-kv/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-data-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/arr-flatten/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/find-up/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ini/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/posix-character-classes/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/cliui/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/fragment-cache/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/findup-sync/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/minimist/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/safe-regex/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/to-object-path/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/to-object-path/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/global-modules/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/global-modules/node_modules/global-prefix/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-finally/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/big.js/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/regex-not/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/map-visit/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/parse-passwd/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/mixin-deep/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/mixin-deep/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/object-visit/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/map-age-cleaner/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/is-windows/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/homedir-polyfill/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/unset-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/unset-value/node_modules/has-values/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/unset-value/node_modules/has-value/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/repeat-element/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/isobject/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/index.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/LICENSE" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/README.md" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/lib/position.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/lib/compiler.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/lib/utils.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/lib/source-maps.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/lib/parser.js" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/snapdragon/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/string-width/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/y18n/package.json" - }, - { - "path": "node_modules/webpack-cli/node_modules/resolve-cwd/package.json" - }, - { - "path": "node_modules/webpack/package.json" - }, - { - "path": "node_modules/webpack/node_modules/des.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/domain-browser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/copy-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/yallist/package.json" - }, - { - "path": "node_modules/webpack/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pascalcase/package.json" - }, - { - "path": "node_modules/webpack/node_modules/expand-brackets/package.json" - }, - { - "path": "node_modules/webpack/node_modules/expand-brackets/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/expand-brackets/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/atob/package.json" - }, - { - "path": "node_modules/webpack/node_modules/hash-base/package.json" - }, - { - "path": "node_modules/webpack/node_modules/once/package.json" - }, - { - "path": "node_modules/webpack/node_modules/for-in/package.json" - }, - { - "path": "node_modules/webpack/node_modules/terser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/terser/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/through2/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-list-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/array-unique/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unique-filename/package.json" - }, - { - "path": "node_modules/webpack/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/decode-uri-component/package.json" - }, - { - "path": "node_modules/webpack/node_modules/create-hmac/package.json" - }, - { - "path": "node_modules/webpack/node_modules/cache-base/package.json" - }, - { - "path": "node_modules/webpack/node_modules/inflight/package.json" - }, - { - "path": "node_modules/webpack/node_modules/union-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/arr-union/package.json" - }, - { - "path": "node_modules/webpack/node_modules/debug/package.json" - }, - { - "path": "node_modules/webpack/node_modules/querystring-es3/package.json" - }, - { - "path": "node_modules/webpack/node_modules/use/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-glob/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object-copy/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object-copy/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object-copy/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/evp_bytestokey/package.json" - }, - { - "path": "node_modules/webpack/node_modules/terser-webpack-plugin/package.json" - }, - { - "path": "node_modules/webpack/node_modules/terser-webpack-plugin/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-node/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-node/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-node/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/randombytes/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-sign/package.json" - }, - { - "path": "node_modules/webpack/node_modules/component-emitter/package.json" - }, - { - "path": "node_modules/webpack/node_modules/public-encrypt/package.json" - }, - { - "path": "node_modules/webpack/node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/webpack/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/define-property/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/define-property/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/define-property/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-map-support/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-map-support/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/watchpack/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pump/package.json" - }, - { - "path": "node_modules/webpack/node_modules/cipher-base/package.json" - }, - { - "path": "node_modules/webpack/node_modules/create-hash/package.json" - }, - { - "path": "node_modules/webpack/node_modules/has-values/package.json" - }, - { - "path": "node_modules/webpack/node_modules/has-values/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/md5.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/hash.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/collection-visit/package.json" - }, - { - "path": "node_modules/webpack/node_modules/has-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/webpack/node_modules/repeat-string/package.json" - }, - { - "path": "node_modules/webpack/node_modules/isarray/package.json" - }, - { - "path": "node_modules/webpack/node_modules/binary-extensions/package.json" - }, - { - "path": "node_modules/webpack/node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/webpack/node_modules/tslib/package.json" - }, - { - "path": "node_modules/webpack/node_modules/acorn/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object.pick/package.json" - }, - { - "path": "node_modules/webpack/node_modules/tty-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/cyclist/package.json" - }, - { - "path": "node_modules/webpack/node_modules/upath/package.json" - }, - { - "path": "node_modules/webpack/node_modules/errno/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object-assign/package.json" - }, - { - "path": "node_modules/webpack/node_modules/crypto-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/os-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/webpack/node_modules/concat-stream/package.json" - }, - { - "path": "node_modules/webpack/node_modules/typedarray/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pkg-dir/package.json" - }, - { - "path": "node_modules/webpack/node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-plain-object/package.json" - }, - { - "path": "node_modules/webpack/node_modules/path-dirname/package.json" - }, - { - "path": "node_modules/webpack/node_modules/chrome-trace-event/package.json" - }, - { - "path": "node_modules/webpack/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/webpack/node_modules/chownr/package.json" - }, - { - "path": "node_modules/webpack/node_modules/querystring/package.json" - }, - { - "path": "node_modules/webpack/node_modules/split-string/package.json" - }, - { - "path": "node_modules/webpack/node_modules/uri-js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/inherits/package.json" - }, - { - "path": "node_modules/webpack/node_modules/buffer-from/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/package.json" - }, - { - "path": "node_modules/webpack/node_modules/braces/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/parse-asn1/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/webpack/node_modules/xtend/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-regex/package.json" - }, - { - "path": "node_modules/webpack/node_modules/brorand/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-cipher/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pbkdf2/package.json" - }, - { - "path": "node_modules/webpack/node_modules/minimalistic-assert/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ret/package.json" - }, - { - "path": "node_modules/webpack/node_modules/process/package.json" - }, - { - "path": "node_modules/webpack/node_modules/copy-concurrently/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/webpack/node_modules/get-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/tapable/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unique-slug/package.json" - }, - { - "path": "node_modules/webpack/node_modules/node-libs-browser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/node-libs-browser/node_modules/punycode/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extglob/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/https-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-util/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon-util/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ieee754/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-map-url/package.json" - }, - { - "path": "node_modules/webpack/node_modules/assign-symbols/package.json" - }, - { - "path": "node_modules/webpack/node_modules/worker-farm/package.json" - }, - { - "path": "node_modules/webpack/node_modules/minimalistic-crypto-utils/package.json" - }, - { - "path": "node_modules/webpack/node_modules/randomfill/package.json" - }, - { - "path": "node_modules/webpack/node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/webpack/node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/webpack/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/webpack/node_modules/p-try/package.json" - }, - { - "path": "node_modules/webpack/node_modules/nanomatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/json5/package.json" - }, - { - "path": "node_modules/webpack/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/webpack/node_modules/readdirp/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/extend-shallow/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-accessor-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-arraybuffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/promise-inflight/package.json" - }, - { - "path": "node_modules/webpack/node_modules/neo-async/package.json" - }, - { - "path": "node_modules/webpack/node_modules/serialize-javascript/package.json" - }, - { - "path": "node_modules/webpack/node_modules/find-cache-dir/package.json" - }, - { - "path": "node_modules/webpack/node_modules/punycode/package.json" - }, - { - "path": "node_modules/webpack/node_modules/stream-http/package.json" - }, - { - "path": "node_modules/webpack/node_modules/resolve-url/package.json" - }, - { - "path": "node_modules/webpack/node_modules/webpack-sources/package.json" - }, - { - "path": "node_modules/webpack/node_modules/webpack-sources/node_modules/source-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/webpack/node_modules/enhanced-resolve/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/webpack/node_modules/miller-rabin/package.json" - }, - { - "path": "node_modules/webpack/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/index.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/CHANGELOG.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/LICENSE" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/README.md" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/cache.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/parsers.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/utils.js" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/.DS_Store" - }, - { - "path": "node_modules/webpack/node_modules/micromatch/lib/compilers.js" - }, - { - "path": "node_modules/webpack/node_modules/set-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/set-value/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/map-cache/package.json" - }, - { - "path": "node_modules/webpack/node_modules/urix/package.json" - }, - { - "path": "node_modules/webpack/node_modules/figgy-pudding/package.json" - }, - { - "path": "node_modules/webpack/node_modules/semver/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mississippi/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/webpack/node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/webpack/node_modules/schema-utils/package.json" - }, - { - "path": "node_modules/webpack/node_modules/flush-write-stream/package.json" - }, - { - "path": "node_modules/webpack/node_modules/prr/package.json" - }, - { - "path": "node_modules/webpack/node_modules/stream-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ssri/package.json" - }, - { - "path": "node_modules/webpack/node_modules/static-extend/package.json" - }, - { - "path": "node_modules/webpack/node_modules/static-extend/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/timers-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/arr-diff/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ms/package.json" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/index.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/hash.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/bin.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha224.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha256.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/.travis.yml" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha512.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/LICENSE" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha384.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/sha1.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/README.md" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/test/hash.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/test/vectors.js" - }, - { - "path": "node_modules/webpack/node_modules/sha.js/test/test.js" - }, - { - "path": "node_modules/webpack/node_modules/util/package.json" - }, - { - "path": "node_modules/webpack/node_modules/util/node_modules/inherits/package.json" - }, - { - "path": "node_modules/webpack/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/webpack/node_modules/class-utils/package.json" - }, - { - "path": "node_modules/webpack/node_modules/class-utils/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/source-map-resolve/package.json" - }, - { - "path": "node_modules/webpack/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-number/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/webpack/node_modules/estraverse/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-wsl/package.json" - }, - { - "path": "node_modules/webpack/node_modules/aproba/package.json" - }, - { - "path": "node_modules/webpack/node_modules/duplexify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-data-descriptor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-data-descriptor/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/arr-flatten/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ajv/package.json" - }, - { - "path": "node_modules/webpack/node_modules/find-up/package.json" - }, - { - "path": "node_modules/webpack/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/webpack/node_modules/events/package.json" - }, - { - "path": "node_modules/webpack/node_modules/base64-js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pumpify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pumpify/node_modules/pump/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-rsa/package.json" - }, - { - "path": "node_modules/webpack/node_modules/console-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/posix-character-classes/package.json" - }, - { - "path": "node_modules/webpack/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-zlib/package.json" - }, - { - "path": "node_modules/webpack/node_modules/buffer-xor/package.json" - }, - { - "path": "node_modules/webpack/node_modules/anymatch/package.json" - }, - { - "path": "node_modules/webpack/node_modules/anymatch/node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fragment-cache/package.json" - }, - { - "path": "node_modules/webpack/node_modules/diffie-hellman/package.json" - }, - { - "path": "node_modules/webpack/node_modules/constants-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/minimist/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ajv-keywords/package.json" - }, - { - "path": "node_modules/webpack/node_modules/run-queue/package.json" - }, - { - "path": "node_modules/webpack/node_modules/move-concurrently/package.json" - }, - { - "path": "node_modules/webpack/node_modules/safe-regex/package.json" - }, - { - "path": "node_modules/webpack/node_modules/normalize-path/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-object-path/package.json" - }, - { - "path": "node_modules/webpack/node_modules/to-object-path/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/webpack/node_modules/stream-each/package.json" - }, - { - "path": "node_modules/webpack/node_modules/path-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/big.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mkdirp/node_modules/minimist/package.json" - }, - { - "path": "node_modules/webpack/node_modules/commondir/package.json" - }, - { - "path": "node_modules/webpack/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/regex-not/package.json" - }, - { - "path": "node_modules/webpack/node_modules/from2/package.json" - }, - { - "path": "node_modules/webpack/node_modules/chokidar/package.json" - }, - { - "path": "node_modules/webpack/node_modules/map-visit/package.json" - }, - { - "path": "node_modules/webpack/node_modules/elliptic/package.json" - }, - { - "path": "node_modules/webpack/node_modules/.bin/sha.js" - }, - { - "path": "node_modules/webpack/node_modules/hmac-drbg/package.json" - }, - { - "path": "node_modules/webpack/node_modules/setimmediate/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-des/package.json" - }, - { - "path": "node_modules/webpack/node_modules/infer-owner/package.json" - }, - { - "path": "node_modules/webpack/node_modules/bluebird/package.json" - }, - { - "path": "node_modules/webpack/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ajv-errors/package.json" - }, - { - "path": "node_modules/webpack/node_modules/url/package.json" - }, - { - "path": "node_modules/webpack/node_modules/url/node_modules/punycode/package.json" - }, - { - "path": "node_modules/webpack/node_modules/create-ecdh/package.json" - }, - { - "path": "node_modules/webpack/node_modules/browserify-aes/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mixin-deep/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mixin-deep/node_modules/is-extendable/package.json" - }, - { - "path": "node_modules/webpack/node_modules/assert/package.json" - }, - { - "path": "node_modules/webpack/node_modules/assert/node_modules/inherits/package.json" - }, - { - "path": "node_modules/webpack/node_modules/assert/node_modules/util/package.json" - }, - { - "path": "node_modules/webpack/node_modules/remove-trailing-separator/package.json" - }, - { - "path": "node_modules/webpack/node_modules/iferr/package.json" - }, - { - "path": "node_modules/webpack/node_modules/object-visit/package.json" - }, - { - "path": "node_modules/webpack/node_modules/cacache/package.json" - }, - { - "path": "node_modules/webpack/node_modules/mamacro/package.json" - }, - { - "path": "node_modules/webpack/node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/webpack/node_modules/bn.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/ripemd160/package.json" - }, - { - "path": "node_modules/webpack/node_modules/commander/package.json" - }, - { - "path": "node_modules/webpack/node_modules/asn1.js/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-windows/package.json" - }, - { - "path": "node_modules/webpack/node_modules/kind-of/package.json" - }, - { - "path": "node_modules/webpack/node_modules/loader-runner/package.json" - }, - { - "path": "node_modules/webpack/node_modules/is-binary-path/package.json" - }, - { - "path": "node_modules/webpack/node_modules/builtin-status-codes/package.json" - }, - { - "path": "node_modules/webpack/node_modules/vm-browserify/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unset-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unset-value/node_modules/has-values/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unset-value/node_modules/has-value/package.json" - }, - { - "path": "node_modules/webpack/node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json" - }, - { - "path": "node_modules/webpack/node_modules/glob/package.json" - }, - { - "path": "node_modules/webpack/node_modules/async-each/package.json" - }, - { - "path": "node_modules/webpack/node_modules/repeat-element/package.json" - }, - { - "path": "node_modules/webpack/node_modules/isobject/package.json" - }, - { - "path": "node_modules/webpack/node_modules/pako/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/floating-point-hex-parser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wast-printer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wasm-opt/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wasm-gen/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-buffer/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/utf8/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wast-parser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/ieee754/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/ast/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-module-context/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-api-error/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/leb128/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-wasm-bytecode/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-fsm/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wasm-parser/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-wasm-section/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/wasm-edit/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@webassemblyjs/helper-code-frame/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@xtuc/long/package.json" - }, - { - "path": "node_modules/webpack/node_modules/@xtuc/ieee754/package.json" - }, - { - "path": "node_modules/webpack/node_modules/fs-write-stream-atomic/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/index.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/LICENSE" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/README.md" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/lib/position.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/lib/compiler.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/lib/utils.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/lib/source-maps.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/lib/parser.js" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/node_modules/define-property/package.json" - }, - { - "path": "node_modules/webpack/node_modules/snapdragon/node_modules/extend-shallow/package.json" - }, - { - "path": "node_modules/webpack/node_modules/y18n/package.json" - }, - { - "path": "node_modules/webpack/node_modules/parallel-transform/package.json" - }, - { - "path": "node_modules/webpack/node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/webpack/node_modules/glob-parent/node_modules/is-glob/package.json" - }, - { - "path": "node_modules/null-loader/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/uri-js/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/json5/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/punycode/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/schema-utils/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/ajv/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/minimist/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/ajv-keywords/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/big.js/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/ajv-errors/package.json" - }, - { - "path": "node_modules/null-loader/node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/ts-loader/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/isarray/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/errno/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/fill-range/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/memory-fs/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/inherits/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/braces/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/color-name/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/tapable/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/json5/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/enhanced-resolve/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/micromatch/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/picomatch/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/semver/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/to-regex-range/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/prr/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/chalk/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/is-number/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/loader-utils/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/minimist/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/big.js/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/ts-loader/node_modules/emojis-list/package.json" - }, - { - "path": "node_modules/pack-n-play/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/yallist/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/once/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/inflight/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/npm-bundled/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/chownr/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/inherits/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/npm-normalize-package-bin/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/npm-packlist/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/minipass/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/fs-minipass/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/minimist/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tar/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/minizlib/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/glob/package.json" - }, - { - "path": "node_modules/typescript/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/fs-extra/node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/mocha/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/define-properties/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/once/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/decamelize/package.json" - }, - { - "path": "node_modules/mocha/node_modules/growl/package.json" - }, - { - "path": "node_modules/mocha/node_modules/inflight/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/debug/package.json" - }, - { - "path": "node_modules/mocha/node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/mocha/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-callable/package.json" - }, - { - "path": "node_modules/mocha/node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/mocha/node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/mocha/node_modules/esprima/package.json" - }, - { - "path": "node_modules/mocha/node_modules/inherits/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-symbols/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/mocha/node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/mocha/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/mocha/node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wide-align/package.json" - }, - { - "path": "node_modules/mocha/node_modules/isexe/package.json" - }, - { - "path": "node_modules/mocha/node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/mocha/node_modules/es-to-primitive/package.json" - }, - { - "path": "node_modules/mocha/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-try/package.json" - }, - { - "path": "node_modules/mocha/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/mocha/node_modules/flat/package.json" - }, - { - "path": "node_modules/mocha/node_modules/argparse/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/semver/package.json" - }, - { - "path": "node_modules/mocha/node_modules/require-directory/package.json" - }, - { - "path": "node_modules/mocha/node_modules/chalk/package.json" - }, - { - "path": "node_modules/mocha/node_modules/chalk/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which-module/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/mocha/node_modules/object-keys/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/object.assign/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/he/package.json" - }, - { - "path": "node_modules/mocha/node_modules/minimist/package.json" - }, - { - "path": "node_modules/mocha/node_modules/diff/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/lodash/package.json" - }, - { - "path": "node_modules/mocha/node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/mocha/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/mocha/node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/mocha/node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/mocha/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/mocha/node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/mocha/node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/node_modules/function-bind/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/y18n/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/once/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/decamelize/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/debug/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/meow/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parseurl/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/statuses/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-ci/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ci-info/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/pump/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/configstore/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse5/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/https-proxy-agent/node_modules/debug/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/https-proxy-agent/node_modules/ms/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/destroy/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/agent-base/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/serve-static/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/esutils/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/responselike/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/unpipe/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/linkinator/node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/linkinator/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/depd/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/inherits/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/color-name/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/domutils/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/cheerio/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/entities/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boolbase/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/css-what/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-try/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/make-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/send/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/css-select/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/range-parser/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/mime/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/error-ex/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/escape-html/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/etag/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/color-name/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/highlight/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/http-errors/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/latest-version/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/domhandler/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/min-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/path-parse/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ms/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/find-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ini/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/gaxios/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/finalhandler/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/got/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/keyv/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/lodash/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/clone-response/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/package-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/fresh/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/registry-url/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/redent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-finally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/term-size/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/nth-check/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/rc/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/on-finished/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ansi-align/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/resolve/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/p-queue/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/ee-first/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/extend/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boxen/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/arrify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string-width/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string-width/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string-width/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/string-width/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/c8/node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/c8/node_modules/load-json-file/node_modules/pify/package.json" - }, - { - "path": "node_modules/c8/node_modules/once/package.json" - }, - { - "path": "node_modules/c8/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/c8/node_modules/decamelize/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/c8/node_modules/source-map/package.json" - }, - { - "path": "node_modules/c8/node_modules/optimist/package.json" - }, - { - "path": "node_modules/c8/node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/c8/node_modules/pify/package.json" - }, - { - "path": "node_modules/c8/node_modules/istanbul-lib-report/package.json" - }, - { - "path": "node_modules/c8/node_modules/inflight/package.json" - }, - { - "path": "node_modules/c8/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/c8/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/c8/node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/c8/node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-key/package.json" - }, - { - "path": "node_modules/c8/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/c8/node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/c8/node_modules/uglify-js/package.json" - }, - { - "path": "node_modules/c8/node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/c8/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/c8/node_modules/handlebars/package.json" - }, - { - "path": "node_modules/c8/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/c8/node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg-up/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg-up/node_modules/find-up/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg-up/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/c8/node_modules/read-pkg-up/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/c8/node_modules/wordwrap/package.json" - }, - { - "path": "node_modules/c8/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs/node_modules/find-up/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/c8/node_modules/inherits/package.json" - }, - { - "path": "node_modules/c8/node_modules/furi/package.json" - }, - { - "path": "node_modules/c8/node_modules/color-name/package.json" - }, - { - "path": "node_modules/c8/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/c8/node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/c8/node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/c8/node_modules/isexe/package.json" - }, - { - "path": "node_modules/c8/node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/c8/node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/c8/node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/c8/node_modules/p-try/package.json" - }, - { - "path": "node_modules/c8/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/c8/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/c8/node_modules/neo-async/package.json" - }, - { - "path": "node_modules/c8/node_modules/which/package.json" - }, - { - "path": "node_modules/c8/node_modules/error-ex/package.json" - }, - { - "path": "node_modules/c8/node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/c8/node_modules/v8-to-istanbul/node_modules/source-map/package.json" - }, - { - "path": "node_modules/c8/node_modules/minimatch/package.json" - }, - { - "path": "node_modules/c8/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/c8/node_modules/semver/package.json" - }, - { - "path": "node_modules/c8/node_modules/require-directory/package.json" - }, - { - "path": "node_modules/c8/node_modules/which-module/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-parse/package.json" - }, - { - "path": "node_modules/c8/node_modules/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/c8/node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/c8/node_modules/wrappy/package.json" - }, - { - "path": "node_modules/c8/node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/c8/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/c8/node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/c8/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/c8/node_modules/find-up/package.json" - }, - { - "path": "node_modules/c8/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/c8/node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-type/package.json" - }, - { - "path": "node_modules/c8/node_modules/path-type/node_modules/pify/package.json" - }, - { - "path": "node_modules/c8/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/c8/node_modules/cliui/package.json" - }, - { - "path": "node_modules/c8/node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/c8/node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/c8/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/c8/node_modules/minimist/package.json" - }, - { - "path": "node_modules/c8/node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/c8/node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/c8/node_modules/concat-map/package.json" - }, - { - "path": "node_modules/c8/node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/c8/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/c8/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/c8/node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/c8/node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/c8/node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/c8/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/c8/node_modules/commander/package.json" - }, - { - "path": "node_modules/c8/node_modules/resolve/package.json" - }, - { - "path": "node_modules/c8/node_modules/is-windows/package.json" - }, - { - "path": "node_modules/c8/node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/c8/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/c8/node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/c8/node_modules/glob/package.json" - }, - { - "path": "node_modules/c8/node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/c8/node_modules/string-width/package.json" - }, - { - "path": "node_modules/c8/node_modules/y18n/package.json" - } + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "protos/google/cloud/workflows/executions/v1beta/executions.proto", + "protos/google/cloud/workflows/v1beta/workflows.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "src/v1beta/executions_client.ts", + "src/v1beta/executions_client_config.json", + "src/v1beta/executions_proto_list.json", + "src/v1beta/workflows_client.ts", + "src/v1beta/workflows_client_config.json", + "src/v1beta/workflows_proto_list.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_executions_v1beta.ts", + "test/gapic_workflows_v1beta.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file diff --git a/synth.py b/synth.py index 22c8b44..00e9887 100644 --- a/synth.py +++ b/synth.py @@ -1,4 +1,4 @@ -# Copyright 2018 Google LLC +# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,31 +15,32 @@ import synthtool as s import synthtool.gcp as gcp +import synthtool.languages.node as node import subprocess import logging logging.basicConfig(level=logging.DEBUG) -# run the microgenerator: -gapic = gcp.GAPICMicrogenerator() -versions = ['v1alpha1'] -for version in versions: - library = gapic.typescript_library( - 'workflows', - generator_args={ - 'package-name': '@google-cloud/workflows' - }, - version=version, - private=True) +gapic = gcp.GAPICBazel() + +# Generates the executions client: +execution_versions = ['v1beta'] +for version in execution_versions: + library = gapic.node_library('workflow-executions', version, bazel_target=f"//google/cloud/workflows/executions/{version}:workflows-executions-{version}-nodejs") + s.copy(library, excludes=['src/index.ts', 'src/v1beta/index.ts', 'README.md', 'package.json']) -s.copy(library, excludes=['README.md', 'package.json']) +# Generates the workflows client: +versions = ['v1beta'] +name = 'workflows' +for version in versions: + library = gapic.node_library(name, version) + s.copy(library, excludes=['src/index.ts', 'src/v1beta/index.ts', 'README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() -s.copy(templates) +templates = common_templates.node_library( + source_location='build/src', versions=versions) +s.copy(templates, excludes=[]) + +node.postprocess_gapic_library() -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npx', 'compileProtos', 'src']) -subprocess.run(['npm', 'run', 'fix']) diff --git a/system-test/fixtures/sample/src/index.js b/system-test/fixtures/sample/src/index.js index 91999ba..51355e0 100644 --- a/system-test/fixtures/sample/src/index.js +++ b/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 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,12 +16,11 @@ // ** 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 workflows = require('@google-cloud/workflows'); +const executions = require('@google-cloud/workflows'); function main() { - const workflowsClient = new workflows.WorkflowsClient(); + const executionsClient = new executions.ExecutionsClient(); } main(); diff --git a/system-test/fixtures/sample/src/index.ts b/system-test/fixtures/sample/src/index.ts index 7acee52..50a87a9 100644 --- a/system-test/fixtures/sample/src/index.ts +++ b/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 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,10 +16,10 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {WorkflowsClient} from '@google-cloud/workflows'; +import {ExecutionsClient} from '@google-cloud/workflows'; function main() { - const workflowsClient = new WorkflowsClient(); + new ExecutionsClient(); } main(); diff --git a/system-test/install.ts b/system-test/install.ts index c9aa74e..4c1ba3e 100644 --- a/system-test/install.ts +++ b/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 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,7 +21,7 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. @@ -35,7 +35,7 @@ describe('typescript consumer tests', () => { await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. diff --git a/test/gapic-v1alpha1.js b/test/gapic-v1alpha1.js deleted file mode 100644 index 881afc9..0000000 --- a/test/gapic-v1alpha1.js +++ /dev/null @@ -1,440 +0,0 @@ -// 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 -// -// 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 workflowsModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('WorkflowsClient', () => { - it('has servicePath', () => { - const servicePath = workflowsModule.v1alpha1.WorkflowsClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = workflowsModule.v1alpha1.WorkflowsClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = workflowsModule.v1alpha1.WorkflowsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({fallback: true}); - assert(client); - }); - - describe('listWorkflows', () => { - it('invokes listWorkflows without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const workflowsElement = {}; - const workflows = [workflowsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - workflows: workflows, - }; - - // Mock Grpc layer - client._innerApiCalls.listWorkflows = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.workflows); - }; - - client.listWorkflows(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.workflows); - done(); - }); - }); - - it('invokes listWorkflows with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listWorkflows = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listWorkflows(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getWorkflow', () => { - it('invokes getWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.workflowPath('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const description = 'description-1724546052'; - const sourceContents = 'sourceContents-1799875906'; - const versionId = 670497310; - const expectedResponse = { - name: name2, - description: description, - sourceContents: sourceContents, - versionId: versionId, - }; - - // Mock Grpc layer - client._innerApiCalls.getWorkflow = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getWorkflow(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.workflowPath('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getWorkflow = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getWorkflow(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createWorkflow', function() { - it('invokes createWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const workflow = {}; - const workflowId = 'workflowId1712917915'; - const request = { - parent: formattedParent, - workflow: workflow, - workflowId: workflowId, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const sourceContents = 'sourceContents-1799875906'; - const versionId = 670497310; - const expectedResponse = { - name: name, - description: description, - sourceContents: sourceContents, - versionId: versionId, - }; - - // Mock Grpc layer - client._innerApiCalls.createWorkflow = mockLongRunningGrpcMethod(request, expectedResponse); - - client.createWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }).catch(err => { - done(err); - }); - }); - - it('invokes createWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.locationPath('[PROJECT]', '[LOCATION]'); - const workflow = {}; - const workflowId = 'workflowId1712917915'; - const request = { - parent: formattedParent, - workflow: workflow, - workflowId: workflowId, - }; - - // Mock Grpc layer - client._innerApiCalls.createWorkflow = mockLongRunningGrpcMethod(request, null, error); - - client.createWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(() => { - assert.fail(); - }).catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert(client._descriptors.longrunning.createWorkflow.responseDecoder instanceof Function); - assert(client._descriptors.longrunning.createWorkflow.metadataDecoder instanceof Function); - }); - }); - - describe('deleteWorkflow', function() { - it('invokes deleteWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.workflowPath('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - const request = { - name: formattedName, - }; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteWorkflow = mockLongRunningGrpcMethod(request, expectedResponse); - - client.deleteWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }).catch(err => { - done(err); - }); - }); - - it('invokes deleteWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.workflowPath('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteWorkflow = mockLongRunningGrpcMethod(request, null, error); - - client.deleteWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(() => { - assert.fail(); - }).catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert(client._descriptors.longrunning.deleteWorkflow.responseDecoder instanceof Function); - assert(client._descriptors.longrunning.deleteWorkflow.metadataDecoder instanceof Function); - }); - }); - - describe('updateWorkflow', function() { - it('invokes updateWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const workflow = {}; - const request = { - workflow: workflow, - }; - - // Mock response - const name = 'name3373707'; - const description = 'description-1724546052'; - const sourceContents = 'sourceContents-1799875906'; - const versionId = 670497310; - const expectedResponse = { - name: name, - description: description, - sourceContents: sourceContents, - versionId: versionId, - }; - - // Mock Grpc layer - client._innerApiCalls.updateWorkflow = mockLongRunningGrpcMethod(request, expectedResponse); - - client.updateWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(responses => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }).catch(err => { - done(err); - }); - }); - - it('invokes updateWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const workflow = {}; - const request = { - workflow: workflow, - }; - - // Mock Grpc layer - client._innerApiCalls.updateWorkflow = mockLongRunningGrpcMethod(request, null, error); - - client.updateWorkflow(request).then(responses => { - const operation = responses[0]; - return operation.promise(); - }).then(() => { - assert.fail(); - }).catch(err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - - it('has longrunning decoder functions', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert(client._descriptors.longrunning.updateWorkflow.responseDecoder instanceof Function); - assert(client._descriptors.longrunning.updateWorkflow.metadataDecoder instanceof Function); - }); - }); - -}); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} - -function mockLongRunningGrpcMethod(expectedRequest, response, error) { - return request => { - assert.deepStrictEqual(request, expectedRequest); - const mockOperation = { - promise: function() { - return new Promise((resolve, reject) => { - if (error) { - reject(error); - } - else { - resolve([response]); - } - }); - } - }; - return Promise.resolve([mockOperation]); - }; -} diff --git a/test/gapic-workflows-v1alpha1.ts b/test/gapic-workflows-v1alpha1.ts deleted file mode 100644 index 39521e2..0000000 --- a/test/gapic-workflows-v1alpha1.ts +++ /dev/null @@ -1,395 +0,0 @@ -// 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 -// -// 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 protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const workflowsModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -function mockLongRunningGrpcMethod( - expectedRequest: {}, - response: {} | null, - error?: {} | null -) { - return (request: {}) => { - assert.deepStrictEqual(request, expectedRequest); - const mockOperation = { - promise() { - return new Promise((resolve, reject) => { - if (error) { - reject(error); - } else { - resolve([response]); - } - }); - }, - }; - return Promise.resolve([mockOperation]); - }; -} -describe('v1alpha1.WorkflowsClient', () => { - it('has servicePath', () => { - const servicePath = workflowsModule.v1alpha1.WorkflowsClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = workflowsModule.v1alpha1.WorkflowsClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = workflowsModule.v1alpha1.WorkflowsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - fallback: true, - }); - assert(client); - }); - describe('getWorkflow', () => { - it('invokes getWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getWorkflow = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getWorkflow(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IGetWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getWorkflow = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getWorkflow(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createWorkflow', () => { - it('invokes createWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.ICreateWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createWorkflow = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .createWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes createWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.ICreateWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createWorkflow = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .createWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('deleteWorkflow', () => { - it('invokes deleteWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteWorkflow = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .deleteWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes deleteWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IDeleteWorkflowRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteWorkflow = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .deleteWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('updateWorkflow', () => { - it('invokes updateWorkflow without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest = {}; - request.workflow = {}; - request.workflow.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateWorkflow = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .updateWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes updateWorkflow with error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IUpdateWorkflowRequest = {}; - request.workflow = {}; - request.workflow.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateWorkflow = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .updateWorkflow(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('listWorkflows', () => { - it('invokes listWorkflows without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listWorkflows = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listWorkflows(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listWorkflowsStream', () => { - it('invokes listWorkflowsStream without error', done => { - const client = new workflowsModule.v1alpha1.WorkflowsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Mock request - const request: protosTypes.google.cloud.workflows.v1alpha1.IListWorkflowsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listWorkflows = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listWorkflowsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(request); - }); - }); -}); diff --git a/test/gapic_executions_v1beta.ts b/test/gapic_executions_v1beta.ts new file mode 100644 index 0000000..06d1633 --- /dev/null +++ b/test/gapic_executions_v1beta.ts @@ -0,0 +1,994 @@ +// Copyright 2020 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 executionsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +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.ExecutionsClient', () => { + it('has servicePath', () => { + const servicePath = executionsModule.v1beta.ExecutionsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = executionsModule.v1beta.ExecutionsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = executionsModule.v1beta.ExecutionsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new executionsModule.v1beta.ExecutionsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.executionsStub, undefined); + await client.initialize(); + assert(client.executionsStub); + }); + + it('has close method', () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new executionsModule.v1beta.ExecutionsClient({ + 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 executionsModule.v1beta.ExecutionsClient({ + 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('createExecution', () => { + it('invokes createExecution without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.createExecution = stubSimpleCall(expectedResponse); + const [response] = await client.createExecution(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createExecution without error using callback', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.createExecution = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createExecution( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.executions.v1beta.IExecution | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createExecution with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createExecution = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createExecution(request), expectedError); + assert( + (client.innerApiCalls.createExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getExecution', () => { + it('invokes getExecution without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.getExecution = stubSimpleCall(expectedResponse); + const [response] = await client.getExecution(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getExecution without error using callback', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.getExecution = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getExecution( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.executions.v1beta.IExecution | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getExecution with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getExecution = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getExecution(request), expectedError); + assert( + (client.innerApiCalls.getExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('cancelExecution', () => { + it('invokes cancelExecution without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.cancelExecution = stubSimpleCall(expectedResponse); + const [response] = await client.cancelExecution(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelExecution without error using callback', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ); + client.innerApiCalls.cancelExecution = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.cancelExecution( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.executions.v1beta.IExecution | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelExecution with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelExecution = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.cancelExecution(request), expectedError); + assert( + (client.innerApiCalls.cancelExecution as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listExecutions', () => { + it('invokes listExecutions without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + ]; + client.innerApiCalls.listExecutions = stubSimpleCall(expectedResponse); + const [response] = await client.listExecutions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExecutions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExecutions without error using callback', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + ]; + client.innerApiCalls.listExecutions = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listExecutions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.workflows.executions.v1beta.IExecution[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listExecutions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listExecutions with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listExecutions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listExecutions(request), expectedError); + assert( + (client.innerApiCalls.listExecutions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listExecutionsStream without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + ]; + client.descriptors.page.listExecutions.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listExecutionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.executions.v1beta.Execution[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.workflows.executions.v1beta.Execution + ) => { + 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.listExecutions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExecutions, request) + ); + assert.strictEqual( + (client.descriptors.page.listExecutions + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listExecutionsStream with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExecutions.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listExecutionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.executions.v1beta.Execution[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.workflows.executions.v1beta.Execution + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listExecutions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listExecutions, request) + ); + assert.strictEqual( + (client.descriptors.page.listExecutions + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExecutions without error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.Execution() + ), + ]; + client.descriptors.page.listExecutions.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.workflows.executions.v1beta.IExecution[] = []; + const iterable = client.listExecutionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listExecutions + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExecutions + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listExecutions with error', async () => { + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listExecutions.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listExecutionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.workflows.executions.v1beta.IExecution[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listExecutions + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listExecutions + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('execution', () => { + const fakePath = '/rendered/path/execution'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + execution: 'executionValue', + }; + const client = new executionsModule.v1beta.ExecutionsClient({ + 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', + 'workflowValue', + '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('matchWorkflowFromExecutionName', () => { + const result = client.matchWorkflowFromExecutionName(fakePath); + assert.strictEqual(result, 'workflowValue'); + 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('workflow', () => { + const fakePath = '/rendered/path/workflow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + }; + const client = new executionsModule.v1beta.ExecutionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowPath', () => { + const result = client.workflowPath( + 'projectValue', + 'locationValue', + 'workflowValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workflowPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowName', () => { + const result = client.matchProjectFromWorkflowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowName', () => { + const result = client.matchLocationFromWorkflowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowFromWorkflowName', () => { + const result = client.matchWorkflowFromWorkflowName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/test/gapic_workflows_v1beta.ts b/test/gapic_workflows_v1beta.ts new file mode 100644 index 0000000..3b65041 --- /dev/null +++ b/test/gapic_workflows_v1beta.ts @@ -0,0 +1,1361 @@ +// Copyright 2020 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 workflowsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +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.WorkflowsClient', () => { + it('has servicePath', () => { + const servicePath = workflowsModule.v1beta.WorkflowsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = workflowsModule.v1beta.WorkflowsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = workflowsModule.v1beta.WorkflowsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new workflowsModule.v1beta.WorkflowsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.workflowsStub, undefined); + await client.initialize(); + assert(client.workflowsStub); + }); + + it('has close method', () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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 workflowsModule.v1beta.WorkflowsClient({ + 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('getWorkflow', () => { + it('invokes getWorkflow without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ); + client.innerApiCalls.getWorkflow = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkflow without error using callback', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ); + client.innerApiCalls.getWorkflow = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.v1beta.IWorkflow | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkflow with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkflow = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getWorkflow(request), expectedError); + assert( + (client.innerApiCalls.getWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createWorkflow', () => { + it('invokes createWorkflow without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createWorkflow = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createWorkflow(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflow without error using callback', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createWorkflow = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createWorkflow( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkflow with call error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflow = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createWorkflow(request), expectedError); + assert( + (client.innerApiCalls.createWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkflow with LRO error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkflow = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createWorkflow(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateWorkflowProgress without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkCreateWorkflowProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateWorkflowProgress with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkCreateWorkflowProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteWorkflow', () => { + it('invokes deleteWorkflow without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteWorkflow = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.deleteWorkflow(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflow without error using callback', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteWorkflow = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteWorkflow( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkflow with call error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflow = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteWorkflow(request), expectedError); + assert( + (client.innerApiCalls.deleteWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkflow with LRO error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkflow = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteWorkflow(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteWorkflowProgress without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkDeleteWorkflowProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteWorkflowProgress with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkDeleteWorkflowProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateWorkflow', () => { + it('invokes updateWorkflow without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() + ); + request.workflow = {}; + request.workflow.name = ''; + const expectedHeaderRequestParams = 'workflow.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateWorkflow = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateWorkflow(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateWorkflow without error using callback', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() + ); + request.workflow = {}; + request.workflow.name = ''; + const expectedHeaderRequestParams = 'workflow.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateWorkflow = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateWorkflow( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.workflows.v1beta.IWorkflow, + protos.google.cloud.workflows.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateWorkflow with call error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() + ); + request.workflow = {}; + request.workflow.name = ''; + const expectedHeaderRequestParams = 'workflow.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateWorkflow = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateWorkflow(request), expectedError); + assert( + (client.innerApiCalls.updateWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateWorkflow with LRO error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() + ); + request.workflow = {}; + request.workflow.name = ''; + const expectedHeaderRequestParams = 'workflow.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateWorkflow = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateWorkflow(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateWorkflow as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateWorkflowProgress without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkUpdateWorkflowProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateWorkflowProgress with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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.checkUpdateWorkflowProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listWorkflows', () => { + it('invokes listWorkflows without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + ]; + client.innerApiCalls.listWorkflows = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflows(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflows as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflows without error using callback', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + ]; + client.innerApiCalls.listWorkflows = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listWorkflows( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.v1beta.IWorkflow[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkflows as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkflows with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflows = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listWorkflows(request), expectedError); + assert( + (client.innerApiCalls.listWorkflows as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkflowsStream without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + ]; + client.descriptors.page.listWorkflows.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.v1beta.Workflow[] = []; + stream.on( + 'data', + (response: protos.google.cloud.workflows.v1beta.Workflow) => { + 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.listWorkflows.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflows, request) + ); + assert.strictEqual( + (client.descriptors.page.listWorkflows + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listWorkflowsStream with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflows.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.v1beta.Workflow[] = []; + stream.on( + 'data', + (response: protos.google.cloud.workflows.v1beta.Workflow) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listWorkflows.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflows, request) + ); + assert.strictEqual( + (client.descriptors.page.listWorkflows + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflows without error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + generateSampleMessage( + new protos.google.cloud.workflows.v1beta.Workflow() + ), + ]; + client.descriptors.page.listWorkflows.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.workflows.v1beta.IWorkflow[] = []; + const iterable = client.listWorkflowsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listWorkflows + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listWorkflows + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listWorkflows with error', async () => { + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflows.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listWorkflowsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.workflows.v1beta.IWorkflow[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listWorkflows + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listWorkflows + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new workflowsModule.v1beta.WorkflowsClient({ + 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('workflow', () => { + const fakePath = '/rendered/path/workflow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + }; + const client = new workflowsModule.v1beta.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workflowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workflowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workflowPath', () => { + const result = client.workflowPath( + 'projectValue', + 'locationValue', + 'workflowValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workflowPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkflowName', () => { + const result = client.matchProjectFromWorkflowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkflowName', () => { + const result = client.matchLocationFromWorkflowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkflowFromWorkflowName', () => { + const result = client.matchWorkflowFromWorkflowName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + (client.pathTemplates.workflowPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 613d355..c78f1c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, diff --git a/webpack.config.js b/webpack.config.js index d64f656..ccf06da 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], },