diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index d68c0bd4397..16c6eb41325 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -52,6 +52,7 @@
"packages/google-cloud-gkeconnect-gateway": "2.0.5",
"packages/google-cloud-gkehub": "3.2.2",
"packages/google-cloud-gkemulticloud": "0.1.4",
+ "packages/google-cloud-kms": "3.1.0",
"packages/google-cloud-ids": "2.1.2",
"packages/google-cloud-iap": "2.0.3",
"packages/google-cloud-iot": "3.1.2",
diff --git a/packages/google-cloud-kms/.OwlBot.yaml b/packages/google-cloud-kms/.OwlBot.yaml
new file mode 100644
index 00000000000..a4354f061a2
--- /dev/null
+++ b/packages/google-cloud-kms/.OwlBot.yaml
@@ -0,0 +1,21 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+deep-remove-regex:
+ - /owl-bot-staging
+
+deep-copy-regex:
+ - source: /google/cloud/kms/(.*)/.*-nodejs
+ dest: /owl-bot-staging/google-cloud-kms/$1
+
diff --git a/packages/google-cloud-kms/.eslintignore b/packages/google-cloud-kms/.eslintignore
new file mode 100644
index 00000000000..ea5b04aebe6
--- /dev/null
+++ b/packages/google-cloud-kms/.eslintignore
@@ -0,0 +1,7 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
+samples/generated/
diff --git a/packages/google-cloud-kms/.eslintrc.json b/packages/google-cloud-kms/.eslintrc.json
new file mode 100644
index 00000000000..78215349546
--- /dev/null
+++ b/packages/google-cloud-kms/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./node_modules/gts"
+}
diff --git a/packages/google-cloud-kms/.gitattributes b/packages/google-cloud-kms/.gitattributes
new file mode 100644
index 00000000000..33739cb74e4
--- /dev/null
+++ b/packages/google-cloud-kms/.gitattributes
@@ -0,0 +1,4 @@
+*.ts text eol=lf
+*.js text eol=lf
+protos/* linguist-generated
+**/api-extractor.json linguist-language=JSON-with-Comments
diff --git a/packages/google-cloud-kms/.gitignore b/packages/google-cloud-kms/.gitignore
new file mode 100644
index 00000000000..5d32b23782f
--- /dev/null
+++ b/packages/google-cloud-kms/.gitignore
@@ -0,0 +1,14 @@
+**/*.log
+**/node_modules
+.coverage
+coverage
+.nyc_output
+docs/
+out/
+build/
+system-test/secrets.js
+system-test/*key.json
+*.lock
+.DS_Store
+package-lock.json
+__pycache__
diff --git a/packages/google-cloud-kms/.jsdoc.js b/packages/google-cloud-kms/.jsdoc.js
new file mode 100644
index 00000000000..36bbc77bc9a
--- /dev/null
+++ b/packages/google-cloud-kms/.jsdoc.js
@@ -0,0 +1,55 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+'use strict';
+
+module.exports = {
+ opts: {
+ readme: './README.md',
+ package: './package.json',
+ template: './node_modules/jsdoc-fresh',
+ recurse: true,
+ verbose: true,
+ destination: './docs/'
+ },
+ plugins: [
+ 'plugins/markdown',
+ 'jsdoc-region-tag'
+ ],
+ source: {
+ excludePattern: '(^|\\/|\\\\)[._]',
+ include: [
+ 'build/src',
+ 'protos'
+ ],
+ includePattern: '\\.js$'
+ },
+ templates: {
+ copyright: 'Copyright 2022 Google LLC',
+ includeDate: false,
+ sourceFiles: false,
+ systemName: '@google-cloud/kms',
+ theme: 'lumen',
+ default: {
+ outputSourceFiles: false
+ }
+ },
+ markdown: {
+ idInHeadings: true
+ }
+};
diff --git a/packages/google-cloud-kms/.mocharc.js b/packages/google-cloud-kms/.mocharc.js
new file mode 100644
index 00000000000..cdb7b752160
--- /dev/null
+++ b/packages/google-cloud-kms/.mocharc.js
@@ -0,0 +1,29 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+const config = {
+ "enable-source-maps": true,
+ "throw-deprecation": true,
+ "timeout": 10000,
+ "recursive": true
+}
+if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
+ delete config['throw-deprecation'];
+}
+if (process.env.MOCHA_REPORTER) {
+ config.reporter = process.env.MOCHA_REPORTER;
+}
+if (process.env.MOCHA_REPORTER_OUTPUT) {
+ config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
+}
+module.exports = config
diff --git a/packages/google-cloud-kms/.nycrc b/packages/google-cloud-kms/.nycrc
new file mode 100644
index 00000000000..b18d5472b62
--- /dev/null
+++ b/packages/google-cloud-kms/.nycrc
@@ -0,0 +1,24 @@
+{
+ "report-dir": "./.coverage",
+ "reporter": ["text", "lcov"],
+ "exclude": [
+ "**/*-test",
+ "**/.coverage",
+ "**/apis",
+ "**/benchmark",
+ "**/conformance",
+ "**/docs",
+ "**/samples",
+ "**/scripts",
+ "**/protos",
+ "**/test",
+ "**/*.d.ts",
+ ".jsdoc.js",
+ "**/.jsdoc.js",
+ "karma.conf.js",
+ "webpack-tests.config.js",
+ "webpack.config.js"
+ ],
+ "exclude-after-remap": false,
+ "all": true
+}
diff --git a/packages/google-cloud-kms/.prettierignore b/packages/google-cloud-kms/.prettierignore
new file mode 100644
index 00000000000..9340ad9b86d
--- /dev/null
+++ b/packages/google-cloud-kms/.prettierignore
@@ -0,0 +1,6 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
diff --git a/packages/google-cloud-kms/.prettierrc.js b/packages/google-cloud-kms/.prettierrc.js
new file mode 100644
index 00000000000..d546a4ad546
--- /dev/null
+++ b/packages/google-cloud-kms/.prettierrc.js
@@ -0,0 +1,17 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+module.exports = {
+ ...require('gts/.prettierrc.json')
+}
diff --git a/packages/google-cloud-kms/.repo-metadata.json b/packages/google-cloud-kms/.repo-metadata.json
new file mode 100644
index 00000000000..7dc132eb95a
--- /dev/null
+++ b/packages/google-cloud-kms/.repo-metadata.json
@@ -0,0 +1,17 @@
+{
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/kms/latest",
+ "api_id": "kms.googleapis.com",
+ "distribution_name": "@google-cloud/kms",
+ "release_level": "stable",
+ "default_version": "v1",
+ "language": "nodejs",
+ "name_pretty": "Google Cloud Key Management Service",
+ "repo": "googleapis/google-cloud-node",
+ "product_documentation": "https://cloud.google.com/kms",
+ "requires_billing": true,
+ "name": "kms",
+ "issue_tracker": "https://issuetracker.google.com/savedsearches/5264932",
+ "codeowner_team": "@googleapis/api-kms",
+ "api_shortname": "cloudkms",
+ "library_type": "GAPIC_AUTO"
+}
diff --git a/packages/google-cloud-kms/CHANGELOG.md b/packages/google-cloud-kms/CHANGELOG.md
new file mode 100644
index 00000000000..99bdea4fb3e
--- /dev/null
+++ b/packages/google-cloud-kms/CHANGELOG.md
@@ -0,0 +1,500 @@
+# Changelog
+
+[npm history][1]
+
+[1]: https://www.npmjs.com/package/@google-cloud/kms?activeTab=versions
+
+## [3.1.0](https://github.com/googleapis/nodejs-kms/compare/v3.0.1...v3.1.0) (2022-11-11)
+
+
+### Features
+
+* **kms:** Enable generation of Locations mixin ([#578](https://github.com/googleapis/nodejs-kms/issues/578)) ([5205ddc](https://github.com/googleapis/nodejs-kms/commit/5205ddc20daa79b1d39b89e2c7ea7063a4f5d93e))
+
+
+### Bug Fixes
+
+* Allow passing gax instance to client constructor ([#570](https://github.com/googleapis/nodejs-kms/issues/570)) ([1072346](https://github.com/googleapis/nodejs-kms/commit/1072346f45496885a6cba33dbb5e72f500661656))
+* Better support for fallback mode ([#565](https://github.com/googleapis/nodejs-kms/issues/565)) ([ebb7caf](https://github.com/googleapis/nodejs-kms/commit/ebb7caf95716814af6e1f3d0b423f68dba289593))
+* Change import long to require ([#566](https://github.com/googleapis/nodejs-kms/issues/566)) ([ac44194](https://github.com/googleapis/nodejs-kms/commit/ac4419470711d19d30811e3ff88659e0484ce38d))
+* **deps:** Use google-gax v3.5.2 ([#581](https://github.com/googleapis/nodejs-kms/issues/581)) ([54c26f3](https://github.com/googleapis/nodejs-kms/commit/54c26f3f97c1e65ee2cc3f85cfed9c8a4b974432))
+* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-kms/issues/1553)) ([#569](https://github.com/googleapis/nodejs-kms/issues/569)) ([c981d1a](https://github.com/googleapis/nodejs-kms/commit/c981d1a423c86a86b2b0ca47f09cedf26be1f28a))
+* Preserve default values in x-goog-request-params header ([#573](https://github.com/googleapis/nodejs-kms/issues/573)) ([2ab539d](https://github.com/googleapis/nodejs-kms/commit/2ab539dd02674f010c10e6933da8d06da0e983b5))
+* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-kms/issues/1546)) ([#568](https://github.com/googleapis/nodejs-kms/issues/568)) ([e704093](https://github.com/googleapis/nodejs-kms/commit/e704093f79aefe6706bae5b62e78525705366fe6))
+* use google-gax v3.3.0 ([c981d1a](https://github.com/googleapis/nodejs-kms/commit/c981d1a423c86a86b2b0ca47f09cedf26be1f28a))
+
+## [3.0.1](https://github.com/googleapis/nodejs-kms/compare/v3.0.0...v3.0.1) (2022-06-30)
+
+
+### Bug Fixes
+
+* **docs:** document fallback rest option ([#561](https://github.com/googleapis/nodejs-kms/issues/561)) ([df8b28f](https://github.com/googleapis/nodejs-kms/commit/df8b28ff9db20a089bbf730038e4051f89f5c4dd))
+
+## [3.0.0](https://github.com/googleapis/nodejs-kms/compare/v2.11.1...v3.0.0) (2022-05-20)
+
+
+### ⚠ BREAKING CHANGES
+
+* update library to use Node 12 (#556)
+
+### Build System
+
+* update library to use Node 12 ([#556](https://github.com/googleapis/nodejs-kms/issues/556)) ([c53f95a](https://github.com/googleapis/nodejs-kms/commit/c53f95abfed91cda76ed480806d38ea77a98aad5))
+
+### [2.11.1](https://github.com/googleapis/nodejs-kms/compare/v2.11.0...v2.11.1) (2022-04-08)
+
+
+### Bug Fixes
+
+* **docs:** document that fast-crc32c must be installed ([#546](https://github.com/googleapis/nodejs-kms/issues/546)) ([57253bb](https://github.com/googleapis/nodejs-kms/commit/57253bb85e91d8d1273cea9ec170a910247b61ab))
+
+## [2.11.0](https://github.com/googleapis/nodejs-kms/compare/v2.10.0...v2.11.0) (2022-02-03)
+
+
+### Features
+
+* add a new EkmService API ([#532](https://github.com/googleapis/nodejs-kms/issues/532)) ([f62a19c](https://github.com/googleapis/nodejs-kms/commit/f62a19ca3944a48e981cee17415f5b5456a7054a))
+
+## [2.10.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.9.0...v2.10.0) (2021-10-19)
+
+
+### Features
+
+* add support for Raw PKCS[#1](https://www.github.com/googleapis/nodejs-kms/issues/1) signing keys ([#509](https://www.github.com/googleapis/nodejs-kms/issues/509)) ([3dfb35d](https://www.github.com/googleapis/nodejs-kms/commit/3dfb35dbe8847d8fbc0635a624e6deff7830d547))
+
+## [2.9.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.8.1...v2.9.0) (2021-10-14)
+
+
+### Features
+
+* add OAEP+SHA1 to the list of supported algorithms ([#503](https://www.github.com/googleapis/nodejs-kms/issues/503)) ([00cc42e](https://www.github.com/googleapis/nodejs-kms/commit/00cc42ed9a30650fc88d27c8205e08bb305dd0f8))
+* add RPC retry information for MacSign, MacVerify, and GenerateRandomBytes Committer: [@bdhess](https://www.github.com/bdhess) ([#506](https://www.github.com/googleapis/nodejs-kms/issues/506)) ([08cd155](https://www.github.com/googleapis/nodejs-kms/commit/08cd15524662ba81a35761df592ea8ce1557e023))
+
+### [2.8.1](https://www.github.com/googleapis/nodejs-kms/compare/v2.8.0...v2.8.1) (2021-09-03)
+
+
+### Bug Fixes
+
+* **build:** migrate to main branch ([#496](https://www.github.com/googleapis/nodejs-kms/issues/496)) ([b1804fb](https://www.github.com/googleapis/nodejs-kms/commit/b1804fbc2bc85cbc03c50c82f33690682dd91d58))
+
+## [2.8.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.7.0...v2.8.0) (2021-08-30)
+
+
+### Features
+
+* add support for Key Reimport ([#493](https://www.github.com/googleapis/nodejs-kms/issues/493)) ([9728525](https://www.github.com/googleapis/nodejs-kms/commit/97285257ec5c28821eb9c7c8d4bb50d2729bf95a))
+
+## [2.7.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.6.0...v2.7.0) (2021-08-23)
+
+
+### Features
+
+* turns on self-signed JWT feature flag ([#490](https://www.github.com/googleapis/nodejs-kms/issues/490)) ([3db7ee5](https://www.github.com/googleapis/nodejs-kms/commit/3db7ee57cbf22a27f639df150c4a408107dfcde6))
+
+## [2.6.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.5.0...v2.6.0) (2021-08-17)
+
+
+### Features
+
+* **kms:** add samples for new rng and hmac kms apis ([#487](https://www.github.com/googleapis/nodejs-kms/issues/487)) ([5278a8e](https://www.github.com/googleapis/nodejs-kms/commit/5278a8e62c14fcc5cc02e4bd7b36e68a4ed48b72))
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.24.1 ([#489](https://www.github.com/googleapis/nodejs-kms/issues/489)) ([f5e8569](https://www.github.com/googleapis/nodejs-kms/commit/f5e85696de33d8870951d684b491338fc3c029f3))
+
+## [2.5.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.4...v2.5.0) (2021-08-05)
+
+
+### Features
+
+* add support for HMAC, Variable Key Destruction, and GenerateRandom ([#484](https://www.github.com/googleapis/nodejs-kms/issues/484)) ([c207423](https://www.github.com/googleapis/nodejs-kms/commit/c207423806e36057d74244e1c79294f595e5a740))
+
+### [2.4.4](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.3...v2.4.4) (2021-07-16)
+
+
+### Bug Fixes
+
+* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#476](https://www.github.com/googleapis/nodejs-kms/issues/476)) ([5332b9f](https://www.github.com/googleapis/nodejs-kms/commit/5332b9f924b3102aeb0c6fb704c8fe451746ce84))
+
+### [2.4.3](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.2...v2.4.3) (2021-07-12)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.1 ([#474](https://www.github.com/googleapis/nodejs-kms/issues/474)) ([1e1a3fc](https://www.github.com/googleapis/nodejs-kms/commit/1e1a3fcb437cdfb86e3fcb06ac34a329898b970a))
+
+### [2.4.2](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.1...v2.4.2) (2021-06-29)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.0 with mTLS ([#471](https://www.github.com/googleapis/nodejs-kms/issues/471)) ([9841f22](https://www.github.com/googleapis/nodejs-kms/commit/9841f227e64da2ee6158b6c43a0339c2b1fa8e3a))
+
+### [2.4.1](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.0...v2.4.1) (2021-06-25)
+
+
+### Bug Fixes
+
+* make request optional in all cases ([#466](https://www.github.com/googleapis/nodejs-kms/issues/466)) ([bba9a58](https://www.github.com/googleapis/nodejs-kms/commit/bba9a58b087c96ff66adbde8702599aac05fc4a1))
+
+## [2.4.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.3.3...v2.4.0) (2021-06-14)
+
+
+### Features
+
+* add ECDSA secp256k1 to the list of supported algorithms ([#464](https://www.github.com/googleapis/nodejs-kms/issues/464)) ([a27f95d](https://www.github.com/googleapis/nodejs-kms/commit/a27f95dffdea8a803d02da443a38b10ed7720c86))
+
+### [2.3.3](https://www.github.com/googleapis/nodejs-kms/compare/v2.3.2...v2.3.3) (2021-05-25)
+
+
+### Bug Fixes
+
+* GoogleAdsError missing using generator version after 1.3.0 ([#456](https://www.github.com/googleapis/nodejs-kms/issues/456)) ([6f9ceae](https://www.github.com/googleapis/nodejs-kms/commit/6f9ceae5600620e889fb87f6ab250c951d73c3c3))
+
+### [2.3.2](https://www.github.com/googleapis/nodejs-kms/compare/v2.3.1...v2.3.2) (2021-05-12)
+
+
+### Bug Fixes
+
+* **deps:** require google-gax v2.12.0 ([#447](https://www.github.com/googleapis/nodejs-kms/issues/447)) ([5fcb7ff](https://www.github.com/googleapis/nodejs-kms/commit/5fcb7ff15d68346f786ac6d0652547232d016f3a))
+* use require() to load JSON protos ([#450](https://www.github.com/googleapis/nodejs-kms/issues/450)) ([bd67dfb](https://www.github.com/googleapis/nodejs-kms/commit/bd67dfba1a813ef7dd67437c3df76fa4b2aaa1c1))
+
+### [2.3.1](https://www.github.com/googleapis/nodejs-kms/compare/v2.3.0...v2.3.1) (2021-02-12)
+
+
+### Bug Fixes
+
+* do not retry on 13 INTERNAL ([#418](https://www.github.com/googleapis/nodejs-kms/issues/418)) ([3f6014a](https://www.github.com/googleapis/nodejs-kms/commit/3f6014ac2cbd6988fd400d076ad46920d3039d5c))
+
+## [2.3.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.2.0...v2.3.0) (2021-01-08)
+
+
+### Features
+
+* **samples:** add integrity verification to Cloud KMS crypto samples ([#409](https://www.github.com/googleapis/nodejs-kms/issues/409)) ([d2897f6](https://www.github.com/googleapis/nodejs-kms/commit/d2897f681ae409b34a50b91ea718fa9e294895c5))
+
+## [2.2.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.1.4...v2.2.0) (2021-01-06)
+
+
+### Features
+
+* introduces style enum ([7e8c957](https://www.github.com/googleapis/nodejs-kms/commit/7e8c957bd457939fb27e9922b4c92ae1e98c4961))
+
+### [2.1.4](https://www.github.com/googleapis/nodejs-kms/compare/v2.1.3...v2.1.4) (2020-11-25)
+
+
+### Bug Fixes
+
+* **browser:** check for fetch on window ([#404](https://www.github.com/googleapis/nodejs-kms/issues/404)) ([96a90e3](https://www.github.com/googleapis/nodejs-kms/commit/96a90e3bea1c8b7e8e2d57cc1eb6204ed326b915))
+
+### [2.1.3](https://www.github.com/googleapis/nodejs-kms/compare/v2.1.2...v2.1.3) (2020-11-07)
+
+
+### Bug Fixes
+
+* do not modify options object, use defaultScopes ([#399](https://www.github.com/googleapis/nodejs-kms/issues/399)) ([288b417](https://www.github.com/googleapis/nodejs-kms/commit/288b4172079145686ca9c129005ba27dec788712))
+
+### [2.1.2](https://www.github.com/googleapis/nodejs-kms/compare/v2.1.1...v2.1.2) (2020-06-12)
+
+
+### Bug Fixes
+
+* handle fallback option properly ([753a5b5](https://www.github.com/googleapis/nodejs-kms/commit/753a5b546a69131fe2627236871d4aa2cf5b1012))
+
+### [2.1.1](https://www.github.com/googleapis/nodejs-kms/compare/v2.1.0...v2.1.1) (2020-06-08)
+
+
+### Bug Fixes
+
+* samples-test script ([#338](https://www.github.com/googleapis/nodejs-kms/issues/338)) ([b3b0c70](https://www.github.com/googleapis/nodejs-kms/commit/b3b0c70b082e4cc7de3063428b20a9b43d1844a5))
+
+## [2.1.0](https://www.github.com/googleapis/nodejs-kms/compare/v2.0.0...v2.1.0) (2020-06-04)
+
+
+### Features
+
+* clean up synth.py by using IAM service option from generator ([#305](https://www.github.com/googleapis/nodejs-kms/issues/305)) ([797ee55](https://www.github.com/googleapis/nodejs-kms/commit/797ee5581a60b66f841951a90bbd2ba3995da58d))
+* **samples:** add new samples ([#324](https://www.github.com/googleapis/nodejs-kms/issues/324)) ([eb1c213](https://www.github.com/googleapis/nodejs-kms/commit/eb1c2137195137858b344e6d2ebace3005d87fe2))
+
+
+### Bug Fixes
+
+* regen protos and tests, fix formatting ([#329](https://www.github.com/googleapis/nodejs-kms/issues/329)) ([e6083a9](https://www.github.com/googleapis/nodejs-kms/commit/e6083a9c3d1e3c97785faee3bdfbe8bcce14d3ee))
+* remove eslint, update gax, fix generated protos, run the generator ([#309](https://www.github.com/googleapis/nodejs-kms/issues/309)) ([54fccb6](https://www.github.com/googleapis/nodejs-kms/commit/54fccb61a01d31fc1e5bec3b73a300fd8fed502e))
+* synth.py clean up for multiple version ([#330](https://www.github.com/googleapis/nodejs-kms/issues/330)) ([50de8d0](https://www.github.com/googleapis/nodejs-kms/commit/50de8d069c95b12e10daed40f1743d710fac7eff))
+* update common protos and fix synth ([#336](https://www.github.com/googleapis/nodejs-kms/issues/336)) ([3ed7e67](https://www.github.com/googleapis/nodejs-kms/commit/3ed7e67e5fbb459b478afb38770fb217ee6f81f4))
+
+## [2.0.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.6.3...v2.0.0) (2020-04-07)
+
+
+### ⚠ BREAKING CHANGES
+
+* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.
+
+New feature: methods with pagination now support async iteration.
+* move to typescript code generation (#264)
+
+### Features
+
+* add support for Cloud EKM to the Cloud KMS service and resource protos ([#306](https://www.github.com/googleapis/nodejs-kms/issues/306)) ([f6e28c7](https://www.github.com/googleapis/nodejs-kms/commit/f6e28c788600d24e89ced41d834ec091600d1238))
+* deferred client initialization ([#286](https://www.github.com/googleapis/nodejs-kms/issues/286)) ([e116119](https://www.github.com/googleapis/nodejs-kms/commit/e11611913e553ac2581c528692174c6e4c0cb627))
+* drop node8 support, support for async iterators ([#300](https://www.github.com/googleapis/nodejs-kms/issues/300)) ([c2ca42e](https://www.github.com/googleapis/nodejs-kms/commit/c2ca42e06286910a94981c5bb2e3989b1f1de2a7))
+* move to typescript code generation ([#264](https://www.github.com/googleapis/nodejs-kms/issues/264)) ([ad02c1c](https://www.github.com/googleapis/nodejs-kms/commit/ad02c1c9978c9489314130a9fcee81d1d0244a0c))
+
+
+### Bug Fixes
+
+* export explicit version in protos.js ([#303](https://www.github.com/googleapis/nodejs-kms/issues/303)) ([90e1b52](https://www.github.com/googleapis/nodejs-kms/commit/90e1b52bd25265500c9c150e9f0c765bb250c309))
+
+### [1.6.3](https://www.github.com/googleapis/nodejs-kms/compare/v1.6.2...v1.6.3) (2020-02-10)
+
+
+### Bug Fixes
+
+* proto messages now accept strings for enums ([b5241d9](https://www.github.com/googleapis/nodejs-kms/commit/b5241d9748864344e68f088d92f59a4fb7032afd))
+
+### [1.6.2](https://www.github.com/googleapis/nodejs-kms/compare/v1.6.1...v1.6.2) (2020-01-09)
+
+
+### Bug Fixes
+
+* protos: removed extra resource annotations, no code changes ([b3d99be](https://www.github.com/googleapis/nodejs-kms/commit/b3d99bed61a3f28cb8a000b8ea84589979deeffd))
+
+### [1.6.1](https://www.github.com/googleapis/nodejs-kms/compare/v1.6.0...v1.6.1) (2020-01-05)
+
+
+### Bug Fixes
+
+* updated proto annotations ([#258](https://www.github.com/googleapis/nodejs-kms/issues/258)) ([b05916b](https://www.github.com/googleapis/nodejs-kms/commit/b05916b35b9f280ba8cbfea5044d52137bd9081c))
+
+## [1.6.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.5.3...v1.6.0) (2019-12-31)
+
+
+### Features
+
+* **samples:** add asymmetric samples ([#241](https://www.github.com/googleapis/nodejs-kms/issues/241)) ([563b941](https://www.github.com/googleapis/nodejs-kms/commit/563b94187df53d5e4a2ab5a07bb7d2d8dad086b5))
+
+
+### Bug Fixes
+
+* remove superfluous base64-encoding/decoding ([#242](https://www.github.com/googleapis/nodejs-kms/issues/242)) ([aad6cc4](https://www.github.com/googleapis/nodejs-kms/commit/aad6cc451952f42b96d752f31399a2c364f07610))
+* **deps:** TypeScript 3.7.0 causes breaking change in typings ([#246](https://www.github.com/googleapis/nodejs-kms/issues/246)) ([d274c2a](https://www.github.com/googleapis/nodejs-kms/commit/d274c2aa336ffa57bc517cabd00cabdead0e518b))
+
+### [1.5.3](https://www.github.com/googleapis/nodejs-kms/compare/v1.5.2...v1.5.3) (2019-11-18)
+
+
+### Bug Fixes
+
+* **docs:** bump release level to GA ([#235](https://www.github.com/googleapis/nodejs-kms/issues/235)) ([d753095](https://www.github.com/googleapis/nodejs-kms/commit/d753095e4b5d623538e20477b69ed96ca801346a))
+
+### [1.5.2](https://www.github.com/googleapis/nodejs-kms/compare/v1.5.1...v1.5.2) (2019-11-14)
+
+
+### Bug Fixes
+
+* **docs:** snippets are now replaced in jsdoc comments ([#230](https://www.github.com/googleapis/nodejs-kms/issues/230)) ([ed142f3](https://www.github.com/googleapis/nodejs-kms/commit/ed142f3479c3fe5b98c65e05b6debfded1bad9b1))
+* import long into proto ts declaration file ([#231](https://www.github.com/googleapis/nodejs-kms/issues/231)) ([bc21cff](https://www.github.com/googleapis/nodejs-kms/commit/bc21cff485bccd679c248a3f9c1137fa99775f76))
+
+### [1.5.1](https://www.github.com/googleapis/nodejs-kms/compare/v1.5.0...v1.5.1) (2019-10-22)
+
+
+### Bug Fixes
+
+* **deps:** bump google-gax to 1.7.5 ([#220](https://www.github.com/googleapis/nodejs-kms/issues/220)) ([f409971](https://www.github.com/googleapis/nodejs-kms/commit/f409971f331438c01316ef8536904d0e72d18243))
+
+## [1.5.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.4.0...v1.5.0) (2019-10-09)
+
+
+### Bug Fixes
+
+* use compatible version of google-gax ([b674eee](https://www.github.com/googleapis/nodejs-kms/commit/b674eee))
+
+
+### Features
+
+* .d.ts for protos ([#210](https://www.github.com/googleapis/nodejs-kms/issues/210)) ([e7ca801](https://www.github.com/googleapis/nodejs-kms/commit/e7ca801))
+
+## [1.4.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.3.2...v1.4.0) (2019-09-16)
+
+
+### Features
+
+* load protos from JSON, grpc-fallback support ([628f665](https://www.github.com/googleapis/nodejs-kms/commit/628f665))
+
+### [1.3.2](https://www.github.com/googleapis/nodejs-kms/compare/v1.3.1...v1.3.2) (2019-08-28)
+
+
+### Bug Fixes
+
+* update retry code settings per API call ([#196](https://www.github.com/googleapis/nodejs-kms/issues/196)) ([3ce2076](https://www.github.com/googleapis/nodejs-kms/commit/3ce2076))
+* use process versions object for client header ([#199](https://www.github.com/googleapis/nodejs-kms/issues/199)) ([900eb1b](https://www.github.com/googleapis/nodejs-kms/commit/900eb1b))
+* **docs:** stop redirecting reference docs to anchor link ([9edd953](https://www.github.com/googleapis/nodejs-kms/commit/9edd953))
+
+### [1.3.1](https://www.github.com/googleapis/nodejs-kms/compare/v1.3.0...v1.3.1) (2019-08-05)
+
+
+### Bug Fixes
+
+* allow calls with no request, add JSON proto ([e50e0ef](https://www.github.com/googleapis/nodejs-kms/commit/e50e0ef))
+
+## [1.3.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.2.1...v1.3.0) (2019-07-02)
+
+
+### Features
+
+* add IAM Policy Options ([#186](https://www.github.com/googleapis/nodejs-kms/issues/186)) ([7474dff](https://www.github.com/googleapis/nodejs-kms/commit/7474dff))
+
+### [1.2.1](https://www.github.com/googleapis/nodejs-kms/compare/v1.2.0...v1.2.1) (2019-06-27)
+
+
+### Bug Fixes
+
+* **docs:** link to reference docs section on googleapis.dev ([#183](https://www.github.com/googleapis/nodejs-kms/issues/183)) ([7c40adf](https://www.github.com/googleapis/nodejs-kms/commit/7c40adf))
+
+## [1.2.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.1.1...v1.2.0) (2019-06-24)
+
+
+### Features
+
+* introduces CreateImportJob, ListImportJob, GetImportJob ([#180](https://www.github.com/googleapis/nodejs-kms/issues/180)) ([9fb4efb](https://www.github.com/googleapis/nodejs-kms/commit/9fb4efb))
+
+### [1.1.1](https://www.github.com/googleapis/nodejs-kms/compare/v1.1.0...v1.1.1) (2019-06-14)
+
+
+### Bug Fixes
+
+* **docs:** move to new client docs URL ([#177](https://www.github.com/googleapis/nodejs-kms/issues/177)) ([50d93e7](https://www.github.com/googleapis/nodejs-kms/commit/50d93e7))
+
+## [1.1.0](https://www.github.com/googleapis/nodejs-kms/compare/v1.0.0...v1.1.0) (2019-06-05)
+
+
+### Features
+
+* support apiEndpoint override in client constructor ([#173](https://www.github.com/googleapis/nodejs-kms/issues/173)) ([0e67019](https://www.github.com/googleapis/nodejs-kms/commit/0e67019))
+
+## [1.0.0](https://www.github.com/googleapis/nodejs-kms/compare/v0.4.0...v1.0.0) (2019-05-20)
+
+
+### ⚠ BREAKING CHANGES
+
+* upgrade engines field to >=8.10.0 (#151)
+
+### Bug Fixes
+
+* **deps:** update dependency google-gax to ^0.26.0 ([#149](https://www.github.com/googleapis/nodejs-kms/issues/149)) ([b92c822](https://www.github.com/googleapis/nodejs-kms/commit/b92c822))
+* DEADLINE_EXCEEDED is no longer retried ([5f4f9ff](https://www.github.com/googleapis/nodejs-kms/commit/5f4f9ff))
+* DEADLINE_EXCEEDED retry code is idempotent ([#159](https://www.github.com/googleapis/nodejs-kms/issues/159)) ([a7e511a](https://www.github.com/googleapis/nodejs-kms/commit/a7e511a))
+* indicate that Encrypt, Decrypt, AsymmetricDecrypt, AsymmetricSign are idempotent, such that they're retried ([122b3f8](https://www.github.com/googleapis/nodejs-kms/commit/122b3f8))
+* **deps:** update dependency google-gax to v1 ([#158](https://www.github.com/googleapis/nodejs-kms/issues/158)) ([91fe078](https://www.github.com/googleapis/nodejs-kms/commit/91fe078))
+
+
+### Build System
+
+* upgrade engines field to >=8.10.0 ([#151](https://www.github.com/googleapis/nodejs-kms/issues/151)) ([45b2a9f](https://www.github.com/googleapis/nodejs-kms/commit/45b2a9f))
+
+## v0.4.0
+
+03-13-2019 16:16 PDT
+
+### New Features
+- feat: add support for the CAVIUM_V2_COMPRESSED type ([#126](https://github.com/googleapis/nodejs-kms/pull/126))
+
+### Bug Fixes
+- fix: throw on invalid credentials
+- fix(deps): update dependency google-gax to ^0.25.0 ([#113](https://github.com/googleapis/nodejs-kms/pull/113))
+
+### Documentation
+- docs: update links in contrib guide ([#125](https://github.com/googleapis/nodejs-kms/pull/125))
+- docs: update contributing path in README ([#119](https://github.com/googleapis/nodejs-kms/pull/119))
+- docs: move CONTRIBUTING.md to root ([#118](https://github.com/googleapis/nodejs-kms/pull/118))
+- docs: add lint/fix example to contributing guide ([#116](https://github.com/googleapis/nodejs-kms/pull/116))
+- docs: fix example comments ([#115](https://github.com/googleapis/nodejs-kms/pull/115))
+
+### Internal / Testing Changes
+- refactor: update json import paths ([#134](https://github.com/googleapis/nodejs-kms/pull/134))
+- build: Add docuploader credentials to node publish jobs ([#132](https://github.com/googleapis/nodejs-kms/pull/132))
+- build: use node10 to run samples-test, system-test etc ([#131](https://github.com/googleapis/nodejs-kms/pull/131))
+- build: update release configuration
+- chore: sync latest proto docs
+- chore(deps): update dependency mocha to v6
+- build: use linkinator for docs test ([#124](https://github.com/googleapis/nodejs-kms/pull/124))
+- chore(deps): update dependency yargs to v13 ([#122](https://github.com/googleapis/nodejs-kms/pull/122))
+- build: create docs test npm scripts ([#121](https://github.com/googleapis/nodejs-kms/pull/121))
+- build: test using @grpc/grpc-js in CI ([#120](https://github.com/googleapis/nodejs-kms/pull/120))
+- refactor: improve generated code style. ([#114](https://github.com/googleapis/nodejs-kms/pull/114))
+- chore(deps): update dependency eslint-config-prettier to v4 ([#112](https://github.com/googleapis/nodejs-kms/pull/112))
+- test: add a system test to list global keys ([#111](https://github.com/googleapis/nodejs-kms/pull/111))
+- build: ignore googleapis.com in doc link check ([#108](https://github.com/googleapis/nodejs-kms/pull/108))
+- chore: sync gapic files
+
+## v0.3.0
+
+01-15-2019 10:50 PST
+
+### Implementation Changes
+- Add iam_policy proto ([#101](https://github.com/googleapis/nodejs-kms/pull/101))
+
+### Dependencies
+- fix(deps): update dependency google-gax to ^0.23.0 ([#105](https://github.com/googleapis/nodejs-kms/pull/105))
+- fix(deps): update dependency google-gax to ^0.22.0 ([#73](https://github.com/googleapis/nodejs-kms/pull/73))
+- chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 ([#71](https://github.com/googleapis/nodejs-kms/pull/71))
+- chore(deps): update dependency through2 to v3 ([#67](https://github.com/googleapis/nodejs-kms/pull/67))
+- chore(deps): update dependency eslint-plugin-node to v8 ([#59](https://github.com/googleapis/nodejs-kms/pull/59))
+- chore(deps): update dependency eslint-plugin-prettier to v3 ([#44](https://github.com/googleapis/nodejs-kms/pull/44))
+
+### Documentation
+- build: check broken links in generated docs ([#102](https://github.com/googleapis/nodejs-kms/pull/102))
+- fix(docs): remove unused IAM message types ([#103](https://github.com/googleapis/nodejs-kms/pull/103))
+- docs: Changes 'dencrypt' to 'decrypt' ([#97](https://github.com/googleapis/nodejs-kms/pull/97))
+- docs: add samples ([#88](https://github.com/googleapis/nodejs-kms/pull/88))
+- docs: update readme badges ([#81](https://github.com/googleapis/nodejs-kms/pull/81))
+
+### Internal / Testing Changes
+- chore(build): inject yoshi automation key ([#96](https://github.com/googleapis/nodejs-kms/pull/96))
+- chore: update nyc and eslint configs ([#95](https://github.com/googleapis/nodejs-kms/pull/95))
+- chore: fix publish.sh permission +x ([#93](https://github.com/googleapis/nodejs-kms/pull/93))
+- fix(build): fix Kokoro release script ([#92](https://github.com/googleapis/nodejs-kms/pull/92))
+- build: add Kokoro configs for autorelease ([#91](https://github.com/googleapis/nodejs-kms/pull/91))
+- chore: always nyc report before calling codecov ([#87](https://github.com/googleapis/nodejs-kms/pull/87))
+- chore: nyc ignore build/test by default ([#86](https://github.com/googleapis/nodejs-kms/pull/86))
+- chore: update the renovate config ([#84](https://github.com/googleapis/nodejs-kms/pull/84))
+- chore: update license file ([#83](https://github.com/googleapis/nodejs-kms/pull/83))
+- fix(build): fix system key decryption ([#79](https://github.com/googleapis/nodejs-kms/pull/79))
+- chore: add a synth.metadata
+- chore: update eslintignore config ([#72](https://github.com/googleapis/nodejs-kms/pull/72))
+- chore: update lint rules ([#69](https://github.com/googleapis/nodejs-kms/pull/69))
+- chore: drop contributors from multiple places ([#70](https://github.com/googleapis/nodejs-kms/pull/70))
+- chore: use latest npm on Windows ([#68](https://github.com/googleapis/nodejs-kms/pull/68))
+- chore: update CircleCI config ([#66](https://github.com/googleapis/nodejs-kms/pull/66))
+- chore: include build in eslintignore ([#63](https://github.com/googleapis/nodejs-kms/pull/63))
+- chore: update issue templates ([#58](https://github.com/googleapis/nodejs-kms/pull/58))
+- chore: remove old issue template ([#56](https://github.com/googleapis/nodejs-kms/pull/56))
+- build: run tests on node11 ([#55](https://github.com/googleapis/nodejs-kms/pull/55))
+- chores(build): do not collect sponge.xml from windows builds ([#54](https://github.com/googleapis/nodejs-kms/pull/54))
+- chores(build): run codecov on continuous builds ([#53](https://github.com/googleapis/nodejs-kms/pull/53))
+- chore: update new issue template ([#52](https://github.com/googleapis/nodejs-kms/pull/52))
+- build: fix codecov uploading on Kokoro ([#48](https://github.com/googleapis/nodejs-kms/pull/48))
+- Update kokoro config ([#45](https://github.com/googleapis/nodejs-kms/pull/45))
+- test: remove appveyor config ([#41](https://github.com/googleapis/nodejs-kms/pull/41))
+- Enable prefer-const in the eslint config ([#38](https://github.com/googleapis/nodejs-kms/pull/38))
+
+## v0.2.0
+
+### New Features
+- Add new features to the library ([#33](https://github.com/googleapis/nodejs-kms/pull/33))
+ - CryptoKeyPurpose: ASSYMETRIC_SIGN, ASSYMETRIC_DECRYPT
+ - CryptoKeyVersion
+ - KeyOperationAttestation
+ - various improved code documentation
+
+### Dependencies
+- fix(deps): update dependency google-gax to ^0.20.0 ([#34](https://github.com/googleapis/nodejs-kms/pull/34))
+- chore(deps): update dependency nyc to v13 ([#25](https://github.com/googleapis/nodejs-kms/pull/25))
+- fix(deps): update dependency google-gax to ^0.19.0 ([#22](https://github.com/googleapis/nodejs-kms/pull/22))
+
+### Internal / Testing Changes
+- Enable no-var in eslint ([#35](https://github.com/googleapis/nodejs-kms/pull/35))
+- Update CI config ([#32](https://github.com/googleapis/nodejs-kms/pull/32))
+- Retry npm install in CI ([#30](https://github.com/googleapis/nodejs-kms/pull/30))
+- Update CI config ([#27](https://github.com/googleapis/nodejs-kms/pull/27))
diff --git a/packages/google-cloud-kms/CODE_OF_CONDUCT.md b/packages/google-cloud-kms/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..2add2547a81
--- /dev/null
+++ b/packages/google-cloud-kms/CODE_OF_CONDUCT.md
@@ -0,0 +1,94 @@
+
+# Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of
+experience, education, socio-economic status, nationality, personal appearance,
+race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, or to ban temporarily or permanently any
+contributor for other behaviors that they deem inappropriate, threatening,
+offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+This Code of Conduct also applies outside the project spaces when the Project
+Steward has a reasonable belief that an individual's behavior may have a
+negative impact on the project or its community.
+
+## Conflict Resolution
+
+We do not believe that all conflict is bad; healthy debate and disagreement
+often yield positive results. However, it is never okay to be disrespectful or
+to engage in behavior that violates the project’s code of conduct.
+
+If you see someone violating the code of conduct, you are encouraged to address
+the behavior directly with those involved. Many issues can be resolved quickly
+and easily, and this gives people more control over the outcome of their
+dispute. If you are unable to resolve the matter for any reason, or if the
+behavior is threatening or harassing, report it. We are dedicated to providing
+an environment where participants feel welcome and safe.
+
+Reports should be directed to *googleapis-stewards@google.com*, the
+Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
+receive and address reported violations of the code of conduct. They will then
+work with a committee consisting of representatives from the Open Source
+Programs Office and the Google Open Source Strategy team. If for any reason you
+are uncomfortable reaching out to the Project Steward, please email
+opensource@google.com.
+
+We will investigate every complaint, but you may not receive a direct response.
+We will use our discretion in determining when and how to follow up on reported
+incidents, which may range from not taking action to permanent expulsion from
+the project and project-sponsored spaces. We will notify the accused of the
+report and provide them an opportunity to discuss it before any action is taken.
+The identity of the reporter will be omitted from the details of the report
+supplied to the accused. In potentially harmful situations, such as ongoing
+harassment or threats to anyone's safety, we may take action without notice.
+
+## Attribution
+
+This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
+available at
+https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
\ No newline at end of file
diff --git a/packages/google-cloud-kms/CONTRIBUTING.md b/packages/google-cloud-kms/CONTRIBUTING.md
new file mode 100644
index 00000000000..a08d6538627
--- /dev/null
+++ b/packages/google-cloud-kms/CONTRIBUTING.md
@@ -0,0 +1,76 @@
+# How to become a contributor and submit your own code
+
+**Table of contents**
+
+* [Contributor License Agreements](#contributor-license-agreements)
+* [Contributing a patch](#contributing-a-patch)
+* [Running the tests](#running-the-tests)
+* [Releasing the library](#releasing-the-library)
+
+## Contributor License Agreements
+
+We'd love to accept your sample apps and patches! Before we can take them, we
+have to jump a couple of legal hurdles.
+
+Please fill out either the individual or corporate Contributor License Agreement
+(CLA).
+
+ * If you are an individual writing original source code and you're sure you
+ own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual).
+ * If you work for a company that wants to allow you to contribute your work,
+ then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate).
+
+Follow either of the two links above to access the appropriate CLA and
+instructions for how to sign and return it. Once we receive it, we'll be able to
+accept your pull requests.
+
+## Contributing A Patch
+
+1. Submit an issue describing your proposed change to the repo in question.
+1. The repo owner will respond to your issue promptly.
+1. If your proposed change is accepted, and you haven't already done so, sign a
+ Contributor License Agreement (see details above).
+1. Fork the desired repo, develop and test your code changes.
+1. Ensure that your code adheres to the existing style in the code to which
+ you are contributing.
+1. Ensure that your code has an appropriate set of tests which all pass.
+1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling.
+1. Submit a pull request.
+
+### Before you begin
+
+1. [Select or create a Cloud Platform project][projects].
+1. [Enable billing for your project][billing].
+1. [Enable the Google Cloud Key Management Service API][enable_api].
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
+
+
+## Running the tests
+
+1. [Prepare your environment for Node.js setup][setup].
+
+1. Install dependencies:
+
+ npm install
+
+1. Run the tests:
+
+ # Run unit tests.
+ npm test
+
+ # Run sample integration tests.
+ npm run samples-test
+
+ # Run all system tests.
+ npm run system-test
+
+1. Lint (and maybe fix) any changes:
+
+ npm run fix
+
+[setup]: https://cloud.google.com/nodejs/docs/setup
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=kms.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-kms/LICENSE b/packages/google-cloud-kms/LICENSE
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/packages/google-cloud-kms/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/packages/google-cloud-kms/README.md b/packages/google-cloud-kms/README.md
new file mode 100644
index 00000000000..a950f5859b5
--- /dev/null
+++ b/packages/google-cloud-kms/README.md
@@ -0,0 +1,200 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Google Cloud Key Management Service: Node.js Client](https://github.com/googleapis/google-cloud-node)
+
+[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
+[![npm version](https://img.shields.io/npm/v/@google-cloud/kms.svg)](https://www.npmjs.org/package/@google-cloud/kms)
+
+
+
+
+Google Cloud Key Management Service (KMS) API client for Node.js
+
+
+A comprehensive list of changes in each version may be found in
+[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms/CHANGELOG.md).
+
+* [Google Cloud Key Management Service Node.js Client API Reference][client-docs]
+* [Google Cloud Key Management Service Documentation][product-docs]
+* [github.com/googleapis/google-cloud-node/packages/google-cloud-kms](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms)
+
+Read more about the client libraries for Cloud APIs, including the older
+Google APIs Client Libraries, in [Client Libraries Explained][explained].
+
+[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
+
+**Table of contents:**
+
+
+* [Quickstart](#quickstart)
+ * [Before you begin](#before-you-begin)
+ * [Installing the client library](#installing-the-client-library)
+ * [Using the client library](#using-the-client-library)
+* [Samples](#samples)
+* [Versioning](#versioning)
+* [Contributing](#contributing)
+* [License](#license)
+
+## Quickstart
+
+### Before you begin
+
+1. [Select or create a Cloud Platform project][projects].
+1. [Enable billing for your project][billing].
+1. [Enable the Google Cloud Key Management Service API][enable_api].
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
+
+### Installing the client library
+
+```bash
+npm install @google-cloud/kms
+```
+
+
+### Using the client library
+
+```javascript
+//
+// TODO(developer): Uncomment these variables before running the sample.
+//
+// const projectId = 'my-project';
+// const locationId = 'us-east1';
+
+// Imports the Cloud KMS library
+const {KeyManagementServiceClient} = require('@google-cloud/kms');
+
+// Instantiates a client
+const client = new KeyManagementServiceClient();
+
+// Build the location name
+const locationName = client.locationPath(projectId, locationId);
+
+async function listKeyRings() {
+ const [keyRings] = await client.listKeyRings({
+ parent: locationName,
+ });
+
+ for (const keyRing of keyRings) {
+ console.log(keyRing.name);
+ }
+
+ return keyRings;
+}
+
+return listKeyRings();
+
+```
+
+
+
+## Samples
+
+Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+
+| Sample | Source Code | Try it |
+| --------------------------- | --------------------------------- | ------ |
+| Ekm_service.create_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js,samples/README.md) |
+| Ekm_service.get_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js,samples/README.md) |
+| Ekm_service.list_ekm_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js,samples/README.md) |
+| Ekm_service.update_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js,samples/README.md) |
+| Key_management_service.asymmetric_decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js,samples/README.md) |
+| Key_management_service.asymmetric_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js,samples/README.md) |
+| Key_management_service.create_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js,samples/README.md) |
+| Key_management_service.create_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js,samples/README.md) |
+| Key_management_service.create_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js,samples/README.md) |
+| Key_management_service.create_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js,samples/README.md) |
+| Key_management_service.decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js,samples/README.md) |
+| Key_management_service.destroy_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js,samples/README.md) |
+| Key_management_service.encrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js,samples/README.md) |
+| Key_management_service.generate_random_bytes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js,samples/README.md) |
+| Key_management_service.get_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js,samples/README.md) |
+| Key_management_service.get_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js,samples/README.md) |
+| Key_management_service.get_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js,samples/README.md) |
+| Key_management_service.get_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js,samples/README.md) |
+| Key_management_service.get_public_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js,samples/README.md) |
+| Key_management_service.import_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js,samples/README.md) |
+| Key_management_service.list_crypto_key_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js,samples/README.md) |
+| Key_management_service.list_crypto_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js,samples/README.md) |
+| Key_management_service.list_import_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js,samples/README.md) |
+| Key_management_service.list_key_rings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js,samples/README.md) |
+| Key_management_service.mac_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js,samples/README.md) |
+| Key_management_service.mac_verify | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js,samples/README.md) |
+| Key_management_service.restore_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js,samples/README.md) |
+| Key_management_service.update_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js,samples/README.md) |
+| Key_management_service.update_crypto_key_primary_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js,samples/README.md) |
+| Key_management_service.update_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/quickstart.js,samples/README.md) |
+| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/test/quickstart.test.js,samples/README.md) |
+
+
+
+The [Google Cloud Key Management Service Node.js Client API Reference][client-docs] documentation
+also contains samples.
+
+## Supported Node.js Versions
+
+Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
+Libraries are compatible with all current _active_ and _maintenance_ versions of
+Node.js.
+If you are using an end-of-life version of Node.js, we recommend that you update
+as soon as possible to an actively supported LTS version.
+
+Google's client libraries support legacy versions of Node.js runtimes on a
+best-efforts basis with the following warnings:
+
+* Legacy versions are not tested in continuous integration.
+* Some security patches and features cannot be backported.
+* Dependencies cannot be kept up-to-date.
+
+Client libraries targeting some end-of-life versions of Node.js are available, and
+can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
+The dist-tags follow the naming convention `legacy-(version)`.
+For example, `npm install @google-cloud/kms@legacy-8` installs client libraries
+for versions compatible with Node.js 8.
+
+## Versioning
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+
+
+This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
+unless absolutely necessary (e.g. because of critical security issues) or with
+an extensive deprecation period. Issues and requests against **stable** libraries
+are addressed with the highest priority.
+
+
+
+
+
+
+More Information: [Google Cloud Platform Launch Stages][launch_stages]
+
+[launch_stages]: https://cloud.google.com/terms/launch-stages
+
+## Contributing
+
+Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
+
+Please note that this `README.md`, the `samples/README.md`,
+and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
+are generated from a central template. To edit one of these files, make an edit
+to its templates in
+[directory](https://github.com/googleapis/synthtool).
+
+## License
+
+Apache Version 2.0
+
+See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
+
+[client-docs]: https://cloud.google.com/nodejs/docs/reference/kms/latest
+[product-docs]: https://cloud.google.com/kms
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=kms.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
diff --git a/packages/google-cloud-kms/linkinator.config.json b/packages/google-cloud-kms/linkinator.config.json
new file mode 100644
index 00000000000..befd23c8633
--- /dev/null
+++ b/packages/google-cloud-kms/linkinator.config.json
@@ -0,0 +1,16 @@
+{
+ "recurse": true,
+ "skip": [
+ "https://codecov.io/gh/googleapis/",
+ "www.googleapis.com",
+ "img.shields.io",
+ "https://console.cloud.google.com/cloudshell",
+ "https://support.google.com"
+ ],
+ "silent": true,
+ "concurrency": 5,
+ "retry": true,
+ "retryErrors": true,
+ "retryErrorsCount": 5,
+ "retryErrorsJitter": 3000
+}
diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json
new file mode 100644
index 00000000000..b435041b1b1
--- /dev/null
+++ b/packages/google-cloud-kms/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@google-cloud/kms",
+ "description": "Google Cloud Key Management Service (KMS) API client for Node.js",
+ "version": "3.1.0",
+ "license": "Apache-2.0",
+ "author": "Google LLC",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "directory": "packages/google-cloud-kms",
+ "url": "https://github.com/googleapis/google-cloud-node.git"
+ },
+ "main": "build/src/index.js",
+ "files": [
+ "build/protos",
+ "build/src"
+ ],
+ "keywords": [
+ "google apis client",
+ "google api client",
+ "google apis",
+ "google api",
+ "google",
+ "google cloud platform",
+ "google cloud",
+ "cloud",
+ "google kms",
+ "kms",
+ "Google Cloud Key Management Service (KMS) API"
+ ],
+ "scripts": {
+ "clean": "gts clean",
+ "compile-protos": "compileProtos src",
+ "compile": "tsc -p . && cp -r protos build/",
+ "docs-test": "linkinator docs",
+ "docs": "jsdoc -c .jsdoc.js",
+ "fix": "gts fix",
+ "lint": "gts check",
+ "precompile": "gts clean",
+ "predocs-test": "npm run docs",
+ "prelint": "cd samples; npm link ../; npm install",
+ "prepare": "npm run compile-protos && npm run compile",
+ "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test",
+ "system-test": "npm run compile && c8 mocha build/system-test",
+ "test": "c8 mocha build/test"
+ },
+ "dependencies": {
+ "google-gax": "^3.5.2"
+ },
+ "devDependencies": {
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^18.0.0",
+ "@types/sinon": "^10.0.0",
+ "c8": "^7.1.0",
+ "gts": "^3.1.0",
+ "jsdoc": "^4.0.0",
+ "jsdoc-fresh": "^2.0.0",
+ "jsdoc-region-tag": "^2.0.0",
+ "linkinator": "^4.0.0",
+ "mocha": "^9.2.2",
+ "null-loader": "^4.0.0",
+ "pack-n-play": "^1.0.0-2",
+ "sinon": "^14.0.0",
+ "ts-loader": "^9.0.0",
+ "typescript": "^4.6.4",
+ "webpack": "^5.0.0",
+ "webpack-cli": "^4.0.0"
+ },
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms"
+}
diff --git a/packages/google-cloud-kms/protos/google/cloud/common_resources.proto b/packages/google-cloud-kms/protos/google/cloud/common_resources.proto
new file mode 100644
index 00000000000..56c9f800d5e
--- /dev/null
+++ b/packages/google-cloud-kms/protos/google/cloud/common_resources.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file contains stub messages for common resources in GCP.
+// It is not intended to be directly generated, and is instead used by
+// other tooling to be able to match common resource patterns.
+syntax = "proto3";
+
+package google.cloud;
+
+import "google/api/resource.proto";
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ pattern: "projects/{project}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Organization"
+ pattern: "organizations/{organization}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Folder"
+ pattern: "folders/{folder}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ pattern: "billingAccounts/{billing_account}"
+};
+
+option (google.api.resource_definition) = {
+ type: "locations.googleapis.com/Location"
+ pattern: "projects/{project}/locations/{location}"
+};
+
diff --git a/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto b/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto
new file mode 100644
index 00000000000..de8669dbf3d
--- /dev/null
+++ b/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto
@@ -0,0 +1,293 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.kms.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Kms.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
+option java_multiple_files = true;
+option java_outer_classname = "EkmServiceProto";
+option java_package = "com.google.cloud.kms.v1";
+option php_namespace = "Google\\Cloud\\Kms\\V1";
+option (google.api.resource_definition) = {
+ type: "servicedirectory.googleapis.com/Service"
+ pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}"
+};
+
+// Google Cloud Key Management EKM Service
+//
+// Manages external cryptographic keys and operations using those keys.
+// Implements a REST model with the following objects:
+// * [EkmConnection][google.cloud.kms.v1.EkmConnection]
+service EkmService {
+ option (google.api.default_host) = "cloudkms.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform,"
+ "https://www.googleapis.com/auth/cloudkms";
+
+ // Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ rpc ListEkmConnections(ListEkmConnectionsRequest)
+ returns (ListEkmConnectionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/ekmConnections"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Returns metadata for a given
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ rpc GetEkmConnection(GetEkmConnectionRequest) returns (EkmConnection) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/ekmConnections/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given
+ // Project and Location.
+ rpc CreateEkmConnection(CreateEkmConnectionRequest) returns (EkmConnection) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/ekmConnections"
+ body: "ekm_connection"
+ };
+ option (google.api.method_signature) =
+ "parent,ekm_connection_id,ekm_connection";
+ }
+
+ // Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
+ rpc UpdateEkmConnection(UpdateEkmConnectionRequest) returns (EkmConnection) {
+ option (google.api.http) = {
+ patch: "/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}"
+ body: "ekm_connection"
+ };
+ option (google.api.method_signature) = "ekm_connection,update_mask";
+ }
+}
+
+// Request message for [KeyManagementService.ListEkmConnections][].
+message ListEkmConnectionsRequest {
+ // Required. The resource name of the location associated with the
+ // [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
+ // `projects/*/locations/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "locations.googleapis.com/Location"
+ }
+ ];
+
+ // Optional. Optional limit on the number of
+ // [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the
+ // response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can
+ // subsequently be obtained by including the
+ // [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional pagination token, returned earlier via
+ // [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token].
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Only include resources that match the filter in the response. For
+ // more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specify how the results should be sorted. If not specified, the
+ // results will be sorted in the default order. For more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for [KeyManagementService.ListEkmConnections][].
+message ListEkmConnectionsResponse {
+ // The list of [EkmConnections][google.cloud.kms.v1.EkmConnection].
+ repeated EkmConnection ekm_connections = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection]
+ // that matched the query.
+ int32 total_size = 3;
+}
+
+// Request message for [KeyManagementService.GetEkmConnection][].
+message GetEkmConnectionRequest {
+ // Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/EkmConnection"
+ }
+ ];
+}
+
+// Request message for [KeyManagementService.CreateEkmConnection][].
+message CreateEkmConnectionRequest {
+ // Required. The resource name of the location associated with the
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
+ // `projects/*/locations/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "locations.googleapis.com/Location"
+ }
+ ];
+
+ // Required. It must be unique within a location and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`.
+ string ekm_connection_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with
+ // initial field values.
+ EkmConnection ekm_connection = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for [KeyManagementService.UpdateEkmConnection][].
+message UpdateEkmConnectionRequest {
+ // Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated
+ // values.
+ EkmConnection ekm_connection = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. List of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+// A [Certificate][google.cloud.kms.v1.Certificate] represents an X.509
+// certificate used to authenticate HTTPS connections to EKM replicas.
+message Certificate {
+ // Required. The raw certificate bytes in DER format.
+ bytes raw_der = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Output only. True if the certificate was parsed successfully.
+ bool parsed = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The issuer distinguished name in RFC 2253 format. Only present
+ // if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ string issuer = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The subject distinguished name in RFC 2253 format. Only
+ // present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ string subject = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The subject Alternative DNS names. Only present if
+ // [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ repeated string subject_alternative_dns_names = 5
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The certificate is not valid before this time. Only present if
+ // [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ google.protobuf.Timestamp not_before_time = 6
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The certificate is not valid after this time. Only present if
+ // [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ google.protobuf.Timestamp not_after_time = 7
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The certificate serial number as a hex string. Only present if
+ // [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ string serial_number = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The SHA-256 certificate fingerprint as a hex string. Only
+ // present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true.
+ string sha256_fingerprint = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// An [EkmConnection][google.cloud.kms.v1.EkmConnection] represents an
+// individual EKM connection. It can be used for creating
+// [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
+// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] with a
+// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
+// [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], as well as
+// performing cryptographic operations using keys created within the
+// [EkmConnection][google.cloud.kms.v1.EkmConnection].
+message EkmConnection {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/EkmConnection"
+ pattern: "projects/{project}/locations/{location}/ekmConnections/{ekm_connection}"
+ };
+
+ // A [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver]
+ // represents an EKM replica that can be reached within an
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ message ServiceResolver {
+ // Required. The resource name of the Service Directory service pointing to
+ // an EKM replica, in the format
+ // `projects/*/locations/*/namespaces/*/services/*`.
+ string service_directory_service = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "servicedirectory.googleapis.com/Service"
+ }
+ ];
+
+ // Optional. The filter applied to the endpoints of the resolved service. If
+ // no filter is specified, all endpoints will be considered. An endpoint
+ // will be chosen arbitrarily from the filtered list for each request.
+ //
+ // For endpoint filter syntax and examples, see
+ // https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.
+ string endpoint_filter = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Required. The hostname of the EKM replica used at TLS and HTTP layers.
+ string hostname = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. A list of leaf server certificates used to authenticate HTTPS
+ // connections to the EKM replica.
+ repeated Certificate server_certificates = 4
+ [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Output only. The resource name for the
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format
+ // `projects/*/locations/*/ekmConnections/*`.
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time at which the
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] was created.
+ google.protobuf.Timestamp create_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // A list of
+ // [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where
+ // the EKM can be reached. There should be one ServiceResolver per EKM
+ // replica. Currently, only a single
+ // [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is
+ // supported.
+ repeated ServiceResolver service_resolvers = 3;
+
+ // This checksum is computed by the server based on the value of other fields,
+ // and may be sent on update requests to ensure the client has an up-to-date
+ // value before proceeding.
+ string etag = 5;
+}
diff --git a/packages/google-cloud-kms/protos/google/cloud/kms/v1/resources.proto b/packages/google-cloud-kms/protos/google/cloud/kms/v1/resources.proto
new file mode 100644
index 00000000000..5029f3e0348
--- /dev/null
+++ b/packages/google-cloud-kms/protos/google/cloud/kms/v1/resources.proto
@@ -0,0 +1,816 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.kms.v1;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Kms.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
+option java_multiple_files = true;
+option java_outer_classname = "KmsResourcesProto";
+option java_package = "com.google.cloud.kms.v1";
+option php_namespace = "Google\\Cloud\\Kms\\V1";
+
+// A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of
+// [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+message KeyRing {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}"
+ };
+
+ // Output only. The resource name for the
+ // [KeyRing][google.cloud.kms.v1.KeyRing] in the format
+ // `projects/*/locations/*/keyRings/*`.
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing]
+ // was created.
+ google.protobuf.Timestamp create_time = 2
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
+// can be used for cryptographic operations.
+//
+// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more
+// [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
+// key material used in cryptographic operations.
+message CryptoKey {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
+ };
+
+ // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
+ // describes the cryptographic capabilities of a
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
+ // for the operations allowed by its purpose. For more information, see [Key
+ // purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
+ enum CryptoKeyPurpose {
+ // Not specified.
+ CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
+ // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+ ENCRYPT_DECRYPT = 1;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with
+ // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
+ // and
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ ASYMMETRIC_SIGN = 5;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with
+ // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
+ // and
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ ASYMMETRIC_DECRYPT = 6;
+
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
+ // with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
+ MAC = 9;
+ }
+
+ // Output only. The resource name for this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. A copy of the "primary"
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
+ // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
+ // [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
+ //
+ // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
+ // updated via
+ // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
+ //
+ // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // may have a primary. For other keys, this field will be omitted.
+ CryptoKeyVersion primary = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Immutable. The immutable purpose of this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ CryptoKeyPurpose purpose = 3 [(google.api.field_behavior) = IMMUTABLE];
+
+ // Output only. The time at which this
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
+ google.protobuf.Timestamp create_time = 5
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
+ // the Key Management Service will automatically:
+ //
+ // 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ // 2. Mark the new version as primary.
+ //
+ // Key rotations performed manually via
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // and
+ // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
+ // do not affect
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
+ //
+ // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // support automatic rotation. For other keys, this field must be omitted.
+ google.protobuf.Timestamp next_rotation_time = 7;
+
+ // Controls the rate of automatic rotation.
+ oneof rotation_schedule {
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
+ // will be advanced by this period when the service automatically rotates a
+ // key. Must be at least 24 hours and at most 876,000 hours.
+ //
+ // If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
+ // set,
+ // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
+ // must also be set.
+ //
+ // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
+ // support automatic rotation. For other keys, this field must be omitted.
+ google.protobuf.Duration rotation_period = 8;
+ }
+
+ // A template describing settings for new
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
+ // properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // instances created by either
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // or auto-rotation are controlled by this template.
+ CryptoKeyVersionTemplate version_template = 11;
+
+ // Labels with user-defined metadata. For more information, see
+ // [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
+ map labels = 10;
+
+ // Immutable. Whether this key may contain imported versions only.
+ bool import_only = 13 [(google.api.field_behavior) = IMMUTABLE];
+
+ // Immutable. The period of time that versions of this key spend in the
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
+ // state before transitioning to
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
+ // If not specified at creation time, the default duration is 24 hours.
+ google.protobuf.Duration destroy_scheduled_duration = 14
+ [(google.api.field_behavior) = IMMUTABLE];
+
+ // Immutable. The resource name of the backend environment where the key
+ // material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
+ // associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
+ // where all related cryptographic operations are performed. Only applicable
+ // if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
+ // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
+ // [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the
+ // resource name in the format `projects/*/locations/*/ekmConnections/*`.
+ // Note, this list is non-exhaustive and may apply to additional
+ // [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
+ string crypto_key_backend = 15 [
+ (google.api.field_behavior) = IMMUTABLE,
+ (google.api.resource_reference) = { type: "*" }
+ ];
+}
+
+// A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate]
+// specifies the properties to use when creating a new
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually
+// with
+// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+// or automatically as a result of auto-rotation.
+message CryptoKeyVersionTemplate {
+ // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
+ // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
+ // template. Immutable. Defaults to
+ // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
+ ProtectionLevel protection_level = 1;
+
+ // Required.
+ // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // to use when creating a
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
+ // template.
+ //
+ // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
+ // this field is omitted and
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+// Contains an HSM-generated attestation about a key operation. For more
+// information, see [Verifying attestations]
+// (https://cloud.google.com/kms/docs/attest-key).
+message KeyOperationAttestation {
+ // Attestation formats provided by the HSM.
+ enum AttestationFormat {
+ // Not specified.
+ ATTESTATION_FORMAT_UNSPECIFIED = 0;
+
+ // Cavium HSM attestation compressed with gzip. Note that this format is
+ // defined by Cavium and subject to change at any time.
+ CAVIUM_V1_COMPRESSED = 3;
+
+ // Cavium HSM attestation V2 compressed with gzip. This is a new format
+ // introduced in Cavium's version 3.2-08.
+ CAVIUM_V2_COMPRESSED = 4;
+ }
+
+ // Certificate chains needed to verify the attestation.
+ // Certificates in chains are PEM-encoded and are ordered based on
+ // https://tools.ietf.org/html/rfc5246#section-7.4.2.
+ message CertificateChains {
+ // Cavium certificate chain corresponding to the attestation.
+ repeated string cavium_certs = 1;
+
+ // Google card certificate chain corresponding to the attestation.
+ repeated string google_card_certs = 2;
+
+ // Google partition certificate chain corresponding to the attestation.
+ repeated string google_partition_certs = 3;
+ }
+
+ // Output only. The format of the attestation data.
+ AttestationFormat format = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The attestation data provided by the HSM when the key
+ // operation was performed.
+ bytes content = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The certificate chains needed to validate the attestation
+ CertificateChains cert_chains = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
+// individual cryptographic key, and the associated key material.
+//
+// An
+// [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+// version can be used for cryptographic operations.
+//
+// For security reasons, the raw cryptographic key material represented by a
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
+// or exported. It can only be used to encrypt, decrypt, or sign data when an
+// authorized user or application invokes Cloud KMS.
+message CryptoKeyVersion {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"
+ };
+
+ // The algorithm of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
+ // parameters must be used for each cryptographic operation.
+ //
+ // The
+ // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
+ // algorithm is usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ //
+ // Algorithms beginning with "RSA_SIGN_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
+ //
+ // The fields in the name after "RSA_SIGN_" correspond to the following
+ // parameters: padding algorithm, modulus bit length, and digest algorithm.
+ //
+ // For PSS, the salt length used is equal to the length of digest
+ // algorithm. For example,
+ // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
+ // will use PSS with a salt length of 256 bits or 32 bytes.
+ //
+ // Algorithms beginning with "RSA_DECRYPT_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
+ //
+ // The fields in the name after "RSA_DECRYPT_" correspond to the following
+ // parameters: padding algorithm, modulus bit length, and digest algorithm.
+ //
+ // Algorithms beginning with "EC_SIGN_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
+ //
+ // The fields in the name after "EC_SIGN_" correspond to the following
+ // parameters: elliptic curve, digest algorithm.
+ //
+ // Algorithms beginning with "HMAC_" are usable with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC].
+ //
+ // The suffix following "HMAC_" corresponds to the hash algorithm being used
+ // (eg. SHA256).
+ //
+ // For more information, see [Key purposes and algorithms]
+ // (https://cloud.google.com/kms/docs/algorithms).
+ enum CryptoKeyVersionAlgorithm {
+ // Not specified.
+ CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;
+
+ // Creates symmetric encryption keys.
+ GOOGLE_SYMMETRIC_ENCRYPTION = 1;
+
+ // RSASSA-PSS 2048 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_2048_SHA256 = 2;
+
+ // RSASSA-PSS 3072 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_3072_SHA256 = 3;
+
+ // RSASSA-PSS 4096 bit key with a SHA256 digest.
+ RSA_SIGN_PSS_4096_SHA256 = 4;
+
+ // RSASSA-PSS 4096 bit key with a SHA512 digest.
+ RSA_SIGN_PSS_4096_SHA512 = 15;
+
+ // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_2048_SHA256 = 5;
+
+ // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_3072_SHA256 = 6;
+
+ // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
+ RSA_SIGN_PKCS1_4096_SHA256 = 7;
+
+ // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
+ RSA_SIGN_PKCS1_4096_SHA512 = 16;
+
+ // RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
+ RSA_SIGN_RAW_PKCS1_2048 = 28;
+
+ // RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
+ RSA_SIGN_RAW_PKCS1_3072 = 29;
+
+ // RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
+ RSA_SIGN_RAW_PKCS1_4096 = 30;
+
+ // RSAES-OAEP 2048 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_2048_SHA256 = 8;
+
+ // RSAES-OAEP 3072 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_3072_SHA256 = 9;
+
+ // RSAES-OAEP 4096 bit key with a SHA256 digest.
+ RSA_DECRYPT_OAEP_4096_SHA256 = 10;
+
+ // RSAES-OAEP 4096 bit key with a SHA512 digest.
+ RSA_DECRYPT_OAEP_4096_SHA512 = 17;
+
+ // RSAES-OAEP 2048 bit key with a SHA1 digest.
+ RSA_DECRYPT_OAEP_2048_SHA1 = 37;
+
+ // RSAES-OAEP 3072 bit key with a SHA1 digest.
+ RSA_DECRYPT_OAEP_3072_SHA1 = 38;
+
+ // RSAES-OAEP 4096 bit key with a SHA1 digest.
+ RSA_DECRYPT_OAEP_4096_SHA1 = 39;
+
+ // ECDSA on the NIST P-256 curve with a SHA256 digest.
+ EC_SIGN_P256_SHA256 = 12;
+
+ // ECDSA on the NIST P-384 curve with a SHA384 digest.
+ EC_SIGN_P384_SHA384 = 13;
+
+ // ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
+ // HSM protection level.
+ EC_SIGN_SECP256K1_SHA256 = 31;
+
+ // HMAC-SHA256 signing with a 256 bit key.
+ HMAC_SHA256 = 32;
+
+ // Algorithm representing symmetric encryption by an external key manager.
+ EXTERNAL_SYMMETRIC_ENCRYPTION = 18;
+ }
+
+ // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
+ // indicating if it can be used.
+ enum CryptoKeyVersionState {
+ // Not specified.
+ CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;
+
+ // This version is still being generated. It may not be used, enabled,
+ // disabled, or destroyed yet. Cloud KMS will automatically mark this
+ // version
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // as soon as the version is ready.
+ PENDING_GENERATION = 5;
+
+ // This version may be used for cryptographic operations.
+ ENABLED = 1;
+
+ // This version may not be used, but the key material is still available,
+ // and the version can be placed back into the
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // state.
+ DISABLED = 2;
+
+ // This version is destroyed, and the key material is no longer stored.
+ // This version may only become
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // again if this version is
+ // [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible]
+ // and the original key material is reimported with a call to
+ // [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
+ DESTROYED = 3;
+
+ // This version is scheduled for destruction, and will be destroyed soon.
+ // Call
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // to put it back into the
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
+ // state.
+ DESTROY_SCHEDULED = 4;
+
+ // This version is still being imported. It may not be used, enabled,
+ // disabled, or destroyed yet. Cloud KMS will automatically mark this
+ // version
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // as soon as the version is ready.
+ PENDING_IMPORT = 6;
+
+ // This version was not imported successfully. It may not be used, enabled,
+ // disabled, or destroyed. The submitted key material has been discarded.
+ // Additional details can be found in
+ // [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason].
+ IMPORT_FAILED = 7;
+ }
+
+ // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
+ // Controls the level of detail returned for
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
+ // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
+ // and
+ // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+ enum CryptoKeyVersionView {
+ // Default view for each
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
+ // include the
+ // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
+ CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0;
+
+ // Provides all fields in each
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
+ // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
+ FULL = 1;
+ }
+
+ // Output only. The resource name for this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The current state of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ CryptoKeyVersionState state = 3;
+
+ // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
+ // describing how crypto operations are performed with this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ ProtectionLevel protection_level = 7
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The
+ // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // supports.
+ CryptoKeyVersionAlgorithm algorithm = 10
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Statement that was generated and signed by the HSM at key
+ // creation time. Use this statement to verify attributes of the key as stored
+ // on the HSM, independently of Google. Only provided for key versions with
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
+ KeyOperationAttestation attestation = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time at which this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
+ google.protobuf.Timestamp create_time = 4
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
+ // generated.
+ google.protobuf.Timestamp generate_time = 11
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
+ // scheduled for destruction. Only present if
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
+ google.protobuf.Timestamp destroy_time = 5
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time this CryptoKeyVersion's key material was
+ // destroyed. Only present if
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
+ google.protobuf.Timestamp destroy_event_time = 6
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
+ // used in the most recent import of this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
+ // the underlying key material was imported.
+ string import_job = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time at which this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
+ // most recently imported.
+ google.protobuf.Timestamp import_time = 15
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The root cause of the most recent import failure. Only present
+ // if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
+ // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
+ string import_failure_reason = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // ExternalProtectionLevelOptions stores a group of additional fields for
+ // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
+ // are specific to the
+ // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
+ // and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
+ // protection levels.
+ ExternalProtectionLevelOptions external_protection_level_options = 17;
+
+ // Output only. Whether or not this key version is eligible for reimport, by
+ // being specified as a target in
+ // [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
+ bool reimport_eligible = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// The public key for a given
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
+// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+message PublicKey {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/PublicKey"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey"
+ };
+
+ // The public key, encoded in PEM format. For more information, see the
+ // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
+ // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
+ // [Textual Encoding of Subject Public Key Info]
+ // (https://tools.ietf.org/html/rfc7468#section-13).
+ string pem = 1;
+
+ // The
+ // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // associated with this key.
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of
+ // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by
+ // computing the CRC32C checksum of
+ // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your
+ // results to this field. Discard the response in case of non-matching
+ // checksum values, and perform a limited number of retries. A persistent
+ // mismatch may indicate an issue in your computation of the CRC32C checksum.
+ // Note: This field is defined as int64 for reasons of compatibility across
+ // different languages. However, it is a non-negative integer, which will
+ // never exceed 2^32-1, and can be safely downconverted to uint32 in languages
+ // that support this type.
+ //
+ // NOTE: This field is in Beta.
+ google.protobuf.Int64Value pem_crc32c = 3;
+
+ // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+ // Provided here for verification.
+ //
+ // NOTE: This field is in Beta.
+ string name = 4;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
+ ProtectionLevel protection_level = 5;
+}
+
+// An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
+// [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
+// [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
+// key material, generated outside of Cloud KMS.
+//
+// When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
+// generate a "wrapping key", which is a public/private key pair. You use the
+// wrapping key to encrypt (also known as wrap) the pre-existing key material to
+// protect it during the import process. The nature of the wrapping key depends
+// on the choice of
+// [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
+// wrapping key generation is complete, the
+// [state][google.cloud.kms.v1.ImportJob.state] will be set to
+// [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
+// [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
+// fetched public key can then be used to wrap your pre-existing key material.
+//
+// Once the key material is wrapped, it can be imported into a new
+// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
+// [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
+// [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
+// Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
+// imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
+// uses the private key portion of the wrapping key to unwrap the key material.
+// Only Cloud KMS has access to the private key.
+//
+// An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
+// created. Once expired, Cloud KMS will no longer be able to import or unwrap
+// any key material that was wrapped with the
+// [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
+//
+// For more information, see
+// [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
+message ImportJob {
+ option (google.api.resource) = {
+ type: "cloudkms.googleapis.com/ImportJob"
+ pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}"
+ };
+
+ // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
+ // key wrapping method chosen for this
+ // [ImportJob][google.cloud.kms.v1.ImportJob].
+ enum ImportMethod {
+ // Not specified.
+ IMPORT_METHOD_UNSPECIFIED = 0;
+
+ // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
+ // scheme defined in the PKCS #11 standard. In summary, this involves
+ // wrapping the raw key with an ephemeral AES key, and wrapping the
+ // ephemeral AES key with a 3072 bit RSA key. For more details, see
+ // [RSA AES key wrap
+ // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
+ RSA_OAEP_3072_SHA1_AES_256 = 1;
+
+ // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
+ // scheme defined in the PKCS #11 standard. In summary, this involves
+ // wrapping the raw key with an ephemeral AES key, and wrapping the
+ // ephemeral AES key with a 4096 bit RSA key. For more details, see
+ // [RSA AES key wrap
+ // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
+ RSA_OAEP_4096_SHA1_AES_256 = 2;
+ }
+
+ // The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
+ // it can be used.
+ enum ImportJobState {
+ // Not specified.
+ IMPORT_JOB_STATE_UNSPECIFIED = 0;
+
+ // The wrapping key for this job is still being generated. It may not be
+ // used. Cloud KMS will automatically mark this job as
+ // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
+ // the wrapping key is generated.
+ PENDING_GENERATION = 1;
+
+ // This job may be used in
+ // [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
+ // and
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // requests.
+ ACTIVE = 2;
+
+ // This job can no longer be used and may not leave this state once entered.
+ EXPIRED = 3;
+ }
+
+ // The public key component of the wrapping key. For details of the type of
+ // key this public key corresponds to, see the
+ // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
+ message WrappingPublicKey {
+ // The public key, encoded in PEM format. For more information, see the [RFC
+ // 7468](https://tools.ietf.org/html/rfc7468) sections for [General
+ // Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
+ // [Textual Encoding of Subject Public Key Info]
+ // (https://tools.ietf.org/html/rfc7468#section-13).
+ string pem = 1;
+ }
+
+ // Output only. The resource name for this
+ // [ImportJob][google.cloud.kms.v1.ImportJob] in the format
+ // `projects/*/locations/*/keyRings/*/importJobs/*`.
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Required. Immutable. The wrapping method to be used for incoming key
+ // material.
+ ImportMethod import_method = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.field_behavior) = IMMUTABLE
+ ];
+
+ // Required. Immutable. The protection level of the
+ // [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+ // of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
+ // on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
+ // into.
+ ProtectionLevel protection_level = 9 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.field_behavior) = IMMUTABLE
+ ];
+
+ // Output only. The time at which this
+ // [ImportJob][google.cloud.kms.v1.ImportJob] was created.
+ google.protobuf.Timestamp create_time = 3
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
+ // material was generated.
+ google.protobuf.Timestamp generate_time = 4
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time at which this
+ // [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
+ // can no longer be used to import key material.
+ google.protobuf.Timestamp expire_time = 5
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
+ // expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
+ // [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
+ google.protobuf.Timestamp expire_event_time = 10
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The current state of the
+ // [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
+ ImportJobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The public key with which to wrap key material prior to
+ // import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
+ // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
+ WrappingPublicKey public_key = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Statement that was generated and signed by the key creator
+ // (for example, an HSM) at key creation time. Use this statement to verify
+ // attributes of the key as stored on the HSM, independently of Google.
+ // Only present if the chosen
+ // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
+ // protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
+ KeyOperationAttestation attestation = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// ExternalProtectionLevelOptions stores a group of additional fields for
+// configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
+// are specific to the [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL]
+// protection level and
+// [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] protection
+// levels.
+message ExternalProtectionLevelOptions {
+ // The URI for an external resource that this
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
+ string external_key_uri = 1;
+
+ // The path to the external key material on the EKM when using
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set
+ // this field instead of external_key_uri when using an
+ // [EkmConnection][google.cloud.kms.v1.EkmConnection].
+ string ekm_connection_key_path = 2;
+}
+
+// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
+// cryptographic operations are performed. For more information, see [Protection
+// levels] (https://cloud.google.com/kms/docs/algorithms#protection_levels).
+enum ProtectionLevel {
+ // Not specified.
+ PROTECTION_LEVEL_UNSPECIFIED = 0;
+
+ // Crypto operations are performed in software.
+ SOFTWARE = 1;
+
+ // Crypto operations are performed in a Hardware Security Module.
+ HSM = 2;
+
+ // Crypto operations are performed by an external key manager.
+ EXTERNAL = 3;
+
+ // Crypto operations are performed in an EKM-over-VPC backend.
+ EXTERNAL_VPC = 4;
+}
diff --git a/packages/google-cloud-kms/protos/google/cloud/kms/v1/service.proto b/packages/google-cloud-kms/protos/google/cloud/kms/v1/service.proto
new file mode 100644
index 00000000000..565678da32c
--- /dev/null
+++ b/packages/google-cloud-kms/protos/google/cloud/kms/v1/service.proto
@@ -0,0 +1,1666 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.kms.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/kms/v1/resources.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/wrappers.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Kms.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
+option java_multiple_files = true;
+option java_outer_classname = "KmsProto";
+option java_package = "com.google.cloud.kms.v1";
+option php_namespace = "Google\\Cloud\\Kms\\V1";
+
+// Google Cloud Key Management Service
+//
+// Manages cryptographic keys and operations using those keys. Implements a REST
+// model with the following objects:
+//
+// * [KeyRing][google.cloud.kms.v1.KeyRing]
+// * [CryptoKey][google.cloud.kms.v1.CryptoKey]
+// * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+// * [ImportJob][google.cloud.kms.v1.ImportJob]
+//
+// If you are using manual gRPC libraries, see
+// [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
+service KeyManagementService {
+ option (google.api.default_host) = "cloudkms.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform,"
+ "https://www.googleapis.com/auth/cloudkms";
+
+ // Lists [KeyRings][google.cloud.kms.v1.KeyRing].
+ rpc ListKeyRings(ListKeyRingsRequest) returns (ListKeyRingsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*}/keyRings"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc ListCryptoKeyVersions(ListCryptoKeyVersionsRequest)
+ returns (ListCryptoKeyVersionsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
+ rpc ListImportJobs(ListImportJobsRequest) returns (ListImportJobsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
+ rpc GetKeyRing(GetKeyRingRequest) returns (KeyRing) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as
+ // well as its [primary][google.cloud.kms.v1.CryptoKey.primary]
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc GetCryptoKey(GetCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Returns metadata for a given
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Returns the public key for the given
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN]
+ // or
+ // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
+ rpc GetPublicKey(GetPublicKeyRequest) returns (PublicKey) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
+ rpc GetImportJob(GetImportJobRequest) returns (ImportJob) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and
+ // Location.
+ rpc CreateKeyRing(CreateKeyRingRequest) returns (KeyRing) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*}/keyRings"
+ body: "key_ring"
+ };
+ option (google.api.method_signature) = "parent,key_ring_id,key_ring";
+ }
+
+ // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a
+ // [KeyRing][google.cloud.kms.v1.KeyRing].
+ //
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and
+ // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm]
+ // are required.
+ rpc CreateCryptoKey(CreateCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys"
+ body: "crypto_key"
+ };
+ option (google.api.method_signature) = "parent,crypto_key_id,crypto_key";
+ }
+
+ // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ //
+ // The server will assign the next sequential id. If unset,
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].
+ rpc CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions"
+ body: "crypto_key_version"
+ };
+ option (google.api.method_signature) = "parent,crypto_key_version";
+ }
+
+ // Import wrapped key material into a
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ //
+ // All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If
+ // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally
+ // specified in the request, key material will be reimported into that
+ // version. Otherwise, a new version will be created, and will be assigned the
+ // next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ rpc ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import"
+ body: "*"
+ };
+ }
+
+ // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a
+ // [KeyRing][google.cloud.kms.v1.KeyRing].
+ //
+ // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is
+ // required.
+ rpc CreateImportJob(CreateImportJobRequest) returns (ImportJob) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs"
+ body: "import_job"
+ };
+ option (google.api.method_signature) = "parent,import_job_id,import_job";
+ }
+
+ // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ rpc UpdateCryptoKey(UpdateCryptoKeyRequest) returns (CryptoKey) {
+ option (google.api.http) = {
+ patch: "/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}"
+ body: "crypto_key"
+ };
+ option (google.api.method_signature) = "crypto_key,update_mask";
+ }
+
+ // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s
+ // metadata.
+ //
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between
+ // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
+ // and
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
+ // using this method. See
+ // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]
+ // and
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // to move between other states.
+ rpc UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ patch: "/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}"
+ body: "crypto_key_version"
+ };
+ option (google.api.method_signature) = "crypto_key_version,update_mask";
+ }
+
+ // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that
+ // will be used in
+ // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+ //
+ // Returns an error if called on a key whose purpose is not
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest)
+ returns (CryptoKey) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,crypto_key_version_id";
+ }
+
+ // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for
+ // destruction.
+ //
+ // Upon calling this method,
+ // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will
+ // be set to
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED],
+ // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will
+ // be set to the time
+ // [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration]
+ // in the future. At that time, the
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically
+ // change to
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED],
+ // and the key material will be irrevocably destroyed.
+ //
+ // Before the
+ // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is
+ // reached,
+ // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
+ // may be called to reverse the process.
+ rpc DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
+ // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
+ // state.
+ //
+ // Upon restoration of the CryptoKeyVersion,
+ // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to
+ // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED],
+ // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will
+ // be cleared.
+ rpc RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest)
+ returns (CryptoKeyVersion) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Encrypts data, so that it can only be recovered by a call to
+ // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ rpc Encrypt(EncryptRequest) returns (EncryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,plaintext";
+ }
+
+ // Decrypts data that was protected by
+ // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
+ // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
+ rpc Decrypt(DecryptRequest) returns (DecryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,ciphertext";
+ }
+
+ // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // ASYMMETRIC_SIGN, producing a signature that can be verified with the public
+ // key retrieved from
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+ rpc AsymmetricSign(AsymmetricSignRequest) returns (AsymmetricSignResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,digest";
+ }
+
+ // Decrypts data that was encrypted with a public key retrieved from
+ // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]
+ // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
+ // ASYMMETRIC_DECRYPT.
+ rpc AsymmetricDecrypt(AsymmetricDecryptRequest)
+ returns (AsymmetricDecryptResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,ciphertext";
+ }
+
+ // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
+ // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC,
+ // producing a tag that can be verified by another source with the same key.
+ rpc MacSign(MacSignRequest) returns (MacSignResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macSign"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,data";
+ }
+
+ // Verifies MAC tag using a
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
+ // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns
+ // a response that indicates whether or not the verification was successful.
+ rpc MacVerify(MacVerifyRequest) returns (MacVerifyResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macVerify"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,data,mac";
+ }
+
+ // Generate random bytes using the Cloud KMS randomness source in the provided
+ // location.
+ rpc GenerateRandomBytes(GenerateRandomBytesRequest)
+ returns (GenerateRandomBytesResponse) {
+ option (google.api.http) = {
+ post: "/v1/{location=projects/*/locations/*}:generateRandomBytes"
+ body: "*"
+ };
+ option (google.api.method_signature) =
+ "location,length_bytes,protection_level";
+ }
+}
+
+// Request message for
+// [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings].
+message ListKeyRingsRequest {
+ // Required. The resource name of the location associated with the
+ // [KeyRings][google.cloud.kms.v1.KeyRing], in the format
+ // `projects/*/locations/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "locations.googleapis.com/Location"
+ }
+ ];
+
+ // Optional. Optional limit on the number of
+ // [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further
+ // [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by
+ // including the
+ // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional pagination token, returned earlier via
+ // [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token].
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Only include resources that match the filter in the response. For
+ // more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specify how the results should be sorted. If not specified, the
+ // results will be sorted in the default order. For more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+message ListCryptoKeysRequest {
+ // Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing]
+ // to list, in the format `projects/*/locations/*/keyRings/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ }
+ ];
+
+ // Optional. Optional limit on the number of
+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response.
+ // Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be
+ // obtained by including the
+ // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional pagination token, returned earlier via
+ // [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token].
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // The fields of the primary version to include in the response.
+ CryptoKeyVersion.CryptoKeyVersionView version_view = 4;
+
+ // Optional. Only include resources that match the filter in the response. For
+ // more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string filter = 5 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specify how the results should be sorted. If not specified, the
+ // results will be sorted in the default order. For more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions].
+message ListCryptoKeyVersionsRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format
+ // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+
+ // Optional. Optional limit on the number of
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the
+ // response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
+ // can subsequently be obtained by including the
+ // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional pagination token, returned earlier via
+ // [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token].
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // The fields to include in the response.
+ CryptoKeyVersion.CryptoKeyVersionView view = 4;
+
+ // Optional. Only include resources that match the filter in the response. For
+ // more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string filter = 5 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specify how the results should be sorted. If not specified, the
+ // results will be sorted in the default order. For more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.ListImportJobs][google.cloud.kms.v1.KeyManagementService.ListImportJobs].
+message ListImportJobsRequest {
+ // Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing]
+ // to list, in the format `projects/*/locations/*/keyRings/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ }
+ ];
+
+ // Optional. Optional limit on the number of
+ // [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response.
+ // Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be
+ // obtained by including the
+ // [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]
+ // in a subsequent request. If unspecified, the server will pick an
+ // appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional pagination token, returned earlier via
+ // [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token].
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Only include resources that match the filter in the response. For
+ // more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string filter = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specify how the results should be sorted. If not specified, the
+ // results will be sorted in the default order. For more information, see
+ // [Sorting and filtering list
+ // results](https://cloud.google.com/kms/docs/sorting-and-filtering).
+ string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for
+// [KeyManagementService.ListKeyRings][google.cloud.kms.v1.KeyManagementService.ListKeyRings].
+message ListKeyRingsResponse {
+ // The list of [KeyRings][google.cloud.kms.v1.KeyRing].
+ repeated KeyRing key_rings = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched
+ // the query.
+ int32 total_size = 3;
+}
+
+// Response message for
+// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
+message ListCryptoKeysResponse {
+ // The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ repeated CryptoKey crypto_keys = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that
+ // matched the query.
+ int32 total_size = 3;
+}
+
+// Response message for
+// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions].
+message ListCryptoKeyVersionsResponse {
+ // The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ repeated CryptoKeyVersion crypto_key_versions = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the
+ // query.
+ int32 total_size = 3;
+}
+
+// Response message for
+// [KeyManagementService.ListImportJobs][google.cloud.kms.v1.KeyManagementService.ListImportJobs].
+message ListImportJobsResponse {
+ // The list of [ImportJobs][google.cloud.kms.v1.ImportJob].
+ repeated ImportJob import_jobs = 1;
+
+ // A token to retrieve next page of results. Pass this value in
+ // [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token]
+ // to retrieve the next page of results.
+ string next_page_token = 2;
+
+ // The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that
+ // matched the query.
+ int32 total_size = 3;
+}
+
+// Request message for
+// [KeyManagementService.GetKeyRing][google.cloud.kms.v1.KeyManagementService.GetKeyRing].
+message GetKeyRingRequest {
+ // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the
+ // [KeyRing][google.cloud.kms.v1.KeyRing] to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.GetCryptoKey][google.cloud.kms.v1.KeyManagementService.GetCryptoKey].
+message GetCryptoKeyRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.GetCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion].
+message GetCryptoKeyVersionRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
+message GetPublicKeyRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.GetImportJob][google.cloud.kms.v1.KeyManagementService.GetImportJob].
+message GetImportJobRequest {
+ // Required. The [name][google.cloud.kms.v1.ImportJob.name] of the
+ // [ImportJob][google.cloud.kms.v1.ImportJob] to get.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/ImportJob"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.CreateKeyRing][google.cloud.kms.v1.KeyManagementService.CreateKeyRing].
+message CreateKeyRingRequest {
+ // Required. The resource name of the location associated with the
+ // [KeyRings][google.cloud.kms.v1.KeyRing], in the format
+ // `projects/*/locations/*`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "locations.googleapis.com/Location"
+ }
+ ];
+
+ // Required. It must be unique within a location and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`
+ string key_ring_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field
+ // values.
+ KeyRing key_ring = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey].
+message CreateCryptoKeyRequest {
+ // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing
+ // associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey].
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ }
+ ];
+
+ // Required. It must be unique within a KeyRing and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`
+ string crypto_key_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field
+ // values.
+ CryptoKey crypto_key = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // If set to true, the request will create a
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] without any
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must
+ // manually call
+ // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
+ // or
+ // [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]
+ // before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey].
+ bool skip_initial_version_creation = 5;
+}
+
+// Request message for
+// [KeyManagementService.CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion].
+message CreateCryptoKeyVersionRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the
+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+
+ // Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
+ // initial field values.
+ CryptoKeyVersion crypto_key_version = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
+message ImportCryptoKeyVersionRequest {
+ // Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into.
+ //
+ // The create permission is only required on this key when creating a new
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+
+ // Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of
+ // an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to
+ // target for an import operation. If this field is not present, a new
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the
+ // supplied key material is created.
+ //
+ // If this field is present, the supplied key material is imported into
+ // the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To
+ // import into an existing
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of
+ // [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent],
+ // have been previously created via [ImportCryptoKeyVersion][], and be in
+ // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]
+ // or
+ // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]
+ // state. The key material and algorithm must match the previous
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained
+ // key material.
+ string crypto_key_version = 6 [
+ (google.api.field_behavior) = OPTIONAL,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+
+ // Required. The
+ // [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
+ // of the key being imported. This does not need to match the
+ // [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into.
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2
+ [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The [name][google.cloud.kms.v1.ImportJob.name] of the
+ // [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key
+ // material.
+ string import_job = 4 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The incoming wrapped key material that is to be imported.
+ oneof wrapped_key_material {
+ // Wrapped key material produced with
+ // [RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256]
+ // or
+ // [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256].
+ //
+ // This field contains the concatenation of two wrapped keys:
+ //
+ // - An ephemeral AES-256 wrapping key wrapped with the
+ // [public_key][google.cloud.kms.v1.ImportJob.public_key] using
+ // RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an
+ // empty label.
+ //
+ // - The key to be imported, wrapped with the ephemeral AES-256 key
+ // using AES-KWP (RFC 5649).
+ //
+ //
+ //
+ // If importing symmetric key material, it is expected that the unwrapped
+ // key contains plain bytes. If importing asymmetric key material, it is
+ // expected that the unwrapped key is in PKCS#8-encoded DER format (the
+ // PrivateKeyInfo structure from RFC 5208).
+ //
+ // This format is the same as the format produced by PKCS#11 mechanism
+ // CKM_RSA_AES_KEY_WRAP.
+ bytes rsa_aes_wrapped_key = 5;
+ }
+}
+
+// Request message for
+// [KeyManagementService.CreateImportJob][google.cloud.kms.v1.KeyManagementService.CreateImportJob].
+message CreateImportJobRequest {
+ // Required. The [name][google.cloud.kms.v1.KeyRing.name] of the
+ // [KeyRing][google.cloud.kms.v1.KeyRing] associated with the
+ // [ImportJobs][google.cloud.kms.v1.ImportJob].
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/KeyRing"
+ }
+ ];
+
+ // Required. It must be unique within a KeyRing and match the regular
+ // expression `[a-zA-Z0-9_-]{1,63}`
+ string import_job_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field
+ // values.
+ ImportJob import_job = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKey][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey].
+message UpdateCryptoKeyRequest {
+ // Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values.
+ CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. List of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion].
+message UpdateCryptoKeyVersionRequest {
+ // Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
+ // updated values.
+ CryptoKeyVersion crypto_key_version = 1
+ [(google.api.field_behavior) = REQUIRED];
+
+ // Required. List of fields to be updated in this request.
+ google.protobuf.FieldMask update_mask = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
+message UpdateCryptoKeyPrimaryVersionRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to update.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+
+ // Required. The id of the child
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary.
+ string crypto_key_version_id = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [KeyManagementService.DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion].
+message DestroyCryptoKeyVersionRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion].
+message RestoreCryptoKeyVersionRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+}
+
+// Request message for
+// [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+message EncryptRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] or
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // encryption.
+ //
+ // If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server
+ // will use its [primary version][google.cloud.kms.v1.CryptoKey.primary].
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = { type: "*" }
+ ];
+
+ // Required. The data to encrypt. Must be no larger than 64KiB.
+ //
+ // The maximum size depends on the key version's
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
+ // For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the
+ // plaintext must be no larger than 64KiB. For
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
+ // the plaintext and additional_authenticated_data fields must be no larger
+ // than 8KiB.
+ bytes plaintext = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. Optional data that, if specified, must also be provided during
+ // decryption through
+ // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data].
+ //
+ // The maximum size depends on the key version's
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
+ // For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the AAD
+ // must be no larger than 64KiB. For
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
+ // the plaintext and additional_authenticated_data fields must be no larger
+ // than 8KiB.
+ bytes additional_authenticated_data = 3
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext])
+ // is equal to
+ // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value plaintext_crc32c = 7
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data])
+ // is equal to
+ // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value additional_authenticated_data_crc32c = 8
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+message DecryptRequest {
+ // Required. The resource name of the
+ // [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The
+ // server will choose the appropriate version.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKey"
+ }
+ ];
+
+ // Required. The encrypted data originally returned in
+ // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext].
+ bytes ciphertext = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. Optional data that must match the data originally supplied in
+ // [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
+ bytes additional_authenticated_data = 3
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext])
+ // is equal to
+ // [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value ciphertext_crc32c = 5
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data])
+ // is equal to
+ // [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value additional_authenticated_data_crc32c = 6
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
+message AsymmetricSignRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // signing.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+
+ // Optional. The digest of the data to sign. The digest must be produced with
+ // the same digest algorithm as specified by the key version's
+ // [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm].
+ //
+ // This field may not be supplied if
+ // [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]
+ // is supplied.
+ Digest digest = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest])
+ // is equal to
+ // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value digest_crc32c = 4
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The data to sign.
+ // It can't be supplied if
+ // [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]
+ // is supplied.
+ bytes data = 6 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. An optional CRC32C checksum of the
+ // [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data])
+ // is equal to
+ // [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value data_crc32c = 7
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
+message AsymmetricDecryptRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // decryption.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+
+ // Required. The data encrypted with the named
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using
+ // OAEP.
+ bytes ciphertext = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. An optional CRC32C checksum of the
+ // [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext].
+ // If specified,
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // verify the integrity of the received
+ // [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]
+ // using this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext])
+ // is equal to
+ // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value ciphertext_crc32c = 4
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
+message MacSignRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // signing.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+
+ // Required. The data to sign. The MAC tag is computed over this data field
+ // based on the specific algorithm.
+ bytes data = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. An optional CRC32C checksum of the
+ // [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If
+ // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService]
+ // will verify the integrity of the received
+ // [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this
+ // checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService]
+ // will report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is
+ // equal to
+ // [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value data_crc32c = 3
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.MacVerify][google.cloud.kms.v1.KeyManagementService.MacVerify].
+message MacVerifyRequest {
+ // Required. The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
+ // verification.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudkms.googleapis.com/CryptoKeyVersion"
+ }
+ ];
+
+ // Required. The data used previously as a
+ // [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate
+ // the MAC tag.
+ bytes data = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. An optional CRC32C checksum of the
+ // [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If
+ // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService]
+ // will verify the integrity of the received
+ // [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using
+ // this checksum.
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
+ // report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data])
+ // is equal to
+ // [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value data_crc32c = 3
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Required. The signature to verify.
+ bytes mac = 4 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. An optional CRC32C checksum of the
+ // [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If
+ // specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService]
+ // will verify the integrity of the received
+ // [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this
+ // checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService]
+ // will report an error if the checksum verification fails. If you receive a
+ // checksum error, your client should verify that
+ // CRC32C([MacVerifyRequest.tag][]) is equal to
+ // [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c],
+ // and if so, perform a limited number of retries. A persistent mismatch may
+ // indicate an issue in your computation of the CRC32C checksum. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value mac_crc32c = 5
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request message for
+// [KeyManagementService.GenerateRandomBytes][google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes].
+message GenerateRandomBytesRequest {
+ // The project-specific location in which to generate random bytes.
+ // For example, "projects/my-project/locations/us-central1".
+ string location = 1;
+
+ // The length in bytes of the amount of randomness to retrieve. Minimum 8
+ // bytes, maximum 1024 bytes.
+ int32 length_bytes = 2;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when
+ // generating the random data. Currently, only
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is
+ // supported.
+ ProtectionLevel protection_level = 3;
+}
+
+// Response message for
+// [KeyManagementService.Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
+message EncryptResponse {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
+ // encryption. Check this field to verify that the intended resource was used
+ // for encryption.
+ string name = 1;
+
+ // The encrypted data.
+ bytes ciphertext = 2;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext].
+ // An integrity check of
+ // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]
+ // can be performed by computing the CRC32C checksum of
+ // [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]
+ // and comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: This field is defined as int64 for reasons of compatibility
+ // across different languages. However, it is a non-negative integer, which
+ // will never exceed 2^32-1, and can be safely downconverted to uint32 in
+ // languages that support this type.
+ google.protobuf.Int64Value ciphertext_crc32c = 4;
+
+ // Integrity verification field. A flag indicating whether
+ // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of
+ // this field indicates either that
+ // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_plaintext_crc32c = 5;
+
+ // Integrity verification field. A flag indicating whether
+ // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A
+ // false value of this field indicates either that
+ // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_additional_authenticated_data_crc32c = 6;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
+ // encryption.
+ ProtectionLevel protection_level = 7;
+}
+
+// Response message for
+// [KeyManagementService.Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
+message DecryptResponse {
+ // The decrypted data originally supplied in
+ // [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
+ bytes plaintext = 1;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext].
+ // An integrity check of
+ // [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]
+ // can be performed by computing the CRC32C checksum of
+ // [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]
+ // and comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: receiving this response message indicates that
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to
+ // successfully decrypt the
+ // [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This
+ // field is defined as int64 for reasons of compatibility across different
+ // languages. However, it is a non-negative integer, which will never exceed
+ // 2^32-1, and can be safely downconverted to uint32 in languages that support
+ // this type.
+ google.protobuf.Int64Value plaintext_crc32c = 2;
+
+ // Whether the Decryption was performed using the primary key version.
+ bool used_primary = 3;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
+ // decryption.
+ ProtectionLevel protection_level = 4;
+}
+
+// Response message for
+// [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
+message AsymmetricSignResponse {
+ // The created signature.
+ bytes signature = 1;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature].
+ // An integrity check of
+ // [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]
+ // can be performed by computing the CRC32C checksum of
+ // [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]
+ // and comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: This field is defined as int64 for reasons of compatibility
+ // across different languages. However, it is a non-negative integer, which
+ // will never exceed 2^32-1, and can be safely downconverted to uint32 in
+ // languages that support this type.
+ google.protobuf.Int64Value signature_crc32c = 2;
+
+ // Integrity verification field. A flag indicating whether
+ // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value
+ // of this field indicates either that
+ // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_digest_crc32c = 3;
+
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing.
+ // Check this field to verify that the intended resource was used for signing.
+ string name = 4;
+
+ // Integrity verification field. A flag indicating whether
+ // [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of
+ // this field indicates either that
+ // [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_data_crc32c = 5;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing.
+ ProtectionLevel protection_level = 6;
+}
+
+// Response message for
+// [KeyManagementService.AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt].
+message AsymmetricDecryptResponse {
+ // The decrypted data originally encrypted with the matching public key.
+ bytes plaintext = 1;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext].
+ // An integrity check of
+ // [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
+ // can be performed by computing the CRC32C checksum of
+ // [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]
+ // and comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: This field is defined as int64 for reasons of compatibility
+ // across different languages. However, it is a non-negative integer, which
+ // will never exceed 2^32-1, and can be safely downconverted to uint32 in
+ // languages that support this type.
+ google.protobuf.Int64Value plaintext_crc32c = 2;
+
+ // Integrity verification field. A flag indicating whether
+ // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A
+ // false value of this field indicates either that
+ // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_ciphertext_crc32c = 3;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in
+ // decryption.
+ ProtectionLevel protection_level = 4;
+}
+
+// Response message for
+// [KeyManagementService.MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
+message MacSignResponse {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing.
+ // Check this field to verify that the intended resource was used for signing.
+ string name = 1;
+
+ // The created signature.
+ bytes mac = 2;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An
+ // integrity check of
+ // [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be
+ // performed by computing the CRC32C checksum of
+ // [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and
+ // comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: This field is defined as int64 for reasons of compatibility
+ // across different languages. However, it is a non-negative integer, which
+ // will never exceed 2^32-1, and can be safely downconverted to uint32 in
+ // languages that support this type.
+ google.protobuf.Int64Value mac_crc32c = 3;
+
+ // Integrity verification field. A flag indicating whether
+ // [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this
+ // field indicates either that
+ // [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_data_crc32c = 4;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing.
+ ProtectionLevel protection_level = 5;
+}
+
+// Response message for
+// [KeyManagementService.MacVerify][google.cloud.kms.v1.KeyManagementService.MacVerify].
+message MacVerifyResponse {
+ // The resource name of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
+ // verification. Check this field to verify that the intended resource was
+ // used for verification.
+ string name = 1;
+
+ // This field indicates whether or not the verification operation for
+ // [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over
+ // [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was
+ // successful.
+ bool success = 2;
+
+ // Integrity verification field. A flag indicating whether
+ // [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this
+ // field indicates either that
+ // [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_data_crc32c = 3;
+
+ // Integrity verification field. A flag indicating whether
+ // [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
+ // was received by
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
+ // for the integrity verification of the
+ // [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this
+ // field indicates either that
+ // [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
+ // was left unset or that it was not delivered to
+ // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
+ // set
+ // [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
+ // but this field is still false, discard the response and perform a limited
+ // number of retries.
+ bool verified_mac_crc32c = 4;
+
+ // Integrity verification field. This value is used for the integrity
+ // verification of [MacVerifyResponse.success]. If the value of this field
+ // contradicts the value of [MacVerifyResponse.success], discard the response
+ // and perform a limited number of retries.
+ bool verified_success_integrity = 5;
+
+ // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
+ // verification.
+ ProtectionLevel protection_level = 6;
+}
+
+// Response message for
+// [KeyManagementService.GenerateRandomBytes][google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes].
+message GenerateRandomBytesResponse {
+ // The generated data.
+ bytes data = 1;
+
+ // Integrity verification field. A CRC32C checksum of the returned
+ // [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data].
+ // An integrity check of
+ // [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]
+ // can be performed by computing the CRC32C checksum of
+ // [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]
+ // and comparing your results to this field. Discard the response in case of
+ // non-matching checksum values, and perform a limited number of retries. A
+ // persistent mismatch may indicate an issue in your computation of the CRC32C
+ // checksum. Note: This field is defined as int64 for reasons of compatibility
+ // across different languages. However, it is a non-negative integer, which
+ // will never exceed 2^32-1, and can be safely downconverted to uint32 in
+ // languages that support this type.
+ google.protobuf.Int64Value data_crc32c = 3;
+}
+
+// A [Digest][google.cloud.kms.v1.Digest] holds a cryptographic message digest.
+message Digest {
+ // Required. The message digest.
+ oneof digest {
+ // A message digest produced with the SHA-256 algorithm.
+ bytes sha256 = 1;
+
+ // A message digest produced with the SHA-384 algorithm.
+ bytes sha384 = 2;
+
+ // A message digest produced with the SHA-512 algorithm.
+ bytes sha512 = 3;
+ }
+}
+
+// Cloud KMS metadata for the given
+// [google.cloud.location.Location][google.cloud.location.Location].
+message LocationMetadata {
+ // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+ // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this
+ // location.
+ bool hsm_available = 1;
+
+ // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with
+ // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
+ // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in
+ // this location.
+ bool ekm_available = 2;
+}
diff --git a/packages/google-cloud-kms/protos/protos.d.ts b/packages/google-cloud-kms/protos/protos.d.ts
new file mode 100644
index 00000000000..6b1a2b361e7
--- /dev/null
+++ b/packages/google-cloud-kms/protos/protos.d.ts
@@ -0,0 +1,12448 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import type {protobuf as $protobuf} from "google-gax";
+import Long = require("long");
+/** Namespace google. */
+export namespace google {
+
+ /** Namespace cloud. */
+ namespace cloud {
+
+ /** Namespace kms. */
+ namespace kms {
+
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Represents an EkmService */
+ class EkmService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new EkmService 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 EkmService 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): EkmService;
+
+ /**
+ * Calls ListEkmConnections.
+ * @param request ListEkmConnectionsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListEkmConnectionsResponse
+ */
+ public listEkmConnections(request: google.cloud.kms.v1.IListEkmConnectionsRequest, callback: google.cloud.kms.v1.EkmService.ListEkmConnectionsCallback): void;
+
+ /**
+ * Calls ListEkmConnections.
+ * @param request ListEkmConnectionsRequest message or plain object
+ * @returns Promise
+ */
+ public listEkmConnections(request: google.cloud.kms.v1.IListEkmConnectionsRequest): Promise;
+
+ /**
+ * Calls GetEkmConnection.
+ * @param request GetEkmConnectionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and EkmConnection
+ */
+ public getEkmConnection(request: google.cloud.kms.v1.IGetEkmConnectionRequest, callback: google.cloud.kms.v1.EkmService.GetEkmConnectionCallback): void;
+
+ /**
+ * Calls GetEkmConnection.
+ * @param request GetEkmConnectionRequest message or plain object
+ * @returns Promise
+ */
+ public getEkmConnection(request: google.cloud.kms.v1.IGetEkmConnectionRequest): Promise;
+
+ /**
+ * Calls CreateEkmConnection.
+ * @param request CreateEkmConnectionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and EkmConnection
+ */
+ public createEkmConnection(request: google.cloud.kms.v1.ICreateEkmConnectionRequest, callback: google.cloud.kms.v1.EkmService.CreateEkmConnectionCallback): void;
+
+ /**
+ * Calls CreateEkmConnection.
+ * @param request CreateEkmConnectionRequest message or plain object
+ * @returns Promise
+ */
+ public createEkmConnection(request: google.cloud.kms.v1.ICreateEkmConnectionRequest): Promise;
+
+ /**
+ * Calls UpdateEkmConnection.
+ * @param request UpdateEkmConnectionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and EkmConnection
+ */
+ public updateEkmConnection(request: google.cloud.kms.v1.IUpdateEkmConnectionRequest, callback: google.cloud.kms.v1.EkmService.UpdateEkmConnectionCallback): void;
+
+ /**
+ * Calls UpdateEkmConnection.
+ * @param request UpdateEkmConnectionRequest message or plain object
+ * @returns Promise
+ */
+ public updateEkmConnection(request: google.cloud.kms.v1.IUpdateEkmConnectionRequest): Promise;
+ }
+
+ namespace EkmService {
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|listEkmConnections}.
+ * @param error Error, if any
+ * @param [response] ListEkmConnectionsResponse
+ */
+ type ListEkmConnectionsCallback = (error: (Error|null), response?: google.cloud.kms.v1.ListEkmConnectionsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|getEkmConnection}.
+ * @param error Error, if any
+ * @param [response] EkmConnection
+ */
+ type GetEkmConnectionCallback = (error: (Error|null), response?: google.cloud.kms.v1.EkmConnection) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|createEkmConnection}.
+ * @param error Error, if any
+ * @param [response] EkmConnection
+ */
+ type CreateEkmConnectionCallback = (error: (Error|null), response?: google.cloud.kms.v1.EkmConnection) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|updateEkmConnection}.
+ * @param error Error, if any
+ * @param [response] EkmConnection
+ */
+ type UpdateEkmConnectionCallback = (error: (Error|null), response?: google.cloud.kms.v1.EkmConnection) => void;
+ }
+
+ /** Properties of a ListEkmConnectionsRequest. */
+ interface IListEkmConnectionsRequest {
+
+ /** ListEkmConnectionsRequest parent */
+ parent?: (string|null);
+
+ /** ListEkmConnectionsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListEkmConnectionsRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListEkmConnectionsRequest filter */
+ filter?: (string|null);
+
+ /** ListEkmConnectionsRequest orderBy */
+ orderBy?: (string|null);
+ }
+
+ /** Represents a ListEkmConnectionsRequest. */
+ class ListEkmConnectionsRequest implements IListEkmConnectionsRequest {
+
+ /**
+ * Constructs a new ListEkmConnectionsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListEkmConnectionsRequest);
+
+ /** ListEkmConnectionsRequest parent. */
+ public parent: string;
+
+ /** ListEkmConnectionsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListEkmConnectionsRequest pageToken. */
+ public pageToken: string;
+
+ /** ListEkmConnectionsRequest filter. */
+ public filter: string;
+
+ /** ListEkmConnectionsRequest orderBy. */
+ public orderBy: string;
+
+ /**
+ * Creates a new ListEkmConnectionsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListEkmConnectionsRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListEkmConnectionsRequest): google.cloud.kms.v1.ListEkmConnectionsRequest;
+
+ /**
+ * Encodes the specified ListEkmConnectionsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsRequest.verify|verify} messages.
+ * @param message ListEkmConnectionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListEkmConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListEkmConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsRequest.verify|verify} messages.
+ * @param message ListEkmConnectionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListEkmConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListEkmConnectionsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListEkmConnectionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListEkmConnectionsRequest;
+
+ /**
+ * Decodes a ListEkmConnectionsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListEkmConnectionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListEkmConnectionsRequest;
+
+ /**
+ * Verifies a ListEkmConnectionsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListEkmConnectionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListEkmConnectionsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListEkmConnectionsRequest;
+
+ /**
+ * Creates a plain object from a ListEkmConnectionsRequest message. Also converts values to other types if specified.
+ * @param message ListEkmConnectionsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListEkmConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListEkmConnectionsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListEkmConnectionsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListEkmConnectionsResponse. */
+ interface IListEkmConnectionsResponse {
+
+ /** ListEkmConnectionsResponse ekmConnections */
+ ekmConnections?: (google.cloud.kms.v1.IEkmConnection[]|null);
+
+ /** ListEkmConnectionsResponse nextPageToken */
+ nextPageToken?: (string|null);
+
+ /** ListEkmConnectionsResponse totalSize */
+ totalSize?: (number|null);
+ }
+
+ /** Represents a ListEkmConnectionsResponse. */
+ class ListEkmConnectionsResponse implements IListEkmConnectionsResponse {
+
+ /**
+ * Constructs a new ListEkmConnectionsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListEkmConnectionsResponse);
+
+ /** ListEkmConnectionsResponse ekmConnections. */
+ public ekmConnections: google.cloud.kms.v1.IEkmConnection[];
+
+ /** ListEkmConnectionsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /** ListEkmConnectionsResponse totalSize. */
+ public totalSize: number;
+
+ /**
+ * Creates a new ListEkmConnectionsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListEkmConnectionsResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListEkmConnectionsResponse): google.cloud.kms.v1.ListEkmConnectionsResponse;
+
+ /**
+ * Encodes the specified ListEkmConnectionsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsResponse.verify|verify} messages.
+ * @param message ListEkmConnectionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListEkmConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListEkmConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsResponse.verify|verify} messages.
+ * @param message ListEkmConnectionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListEkmConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListEkmConnectionsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListEkmConnectionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListEkmConnectionsResponse;
+
+ /**
+ * Decodes a ListEkmConnectionsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListEkmConnectionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListEkmConnectionsResponse;
+
+ /**
+ * Verifies a ListEkmConnectionsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListEkmConnectionsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListEkmConnectionsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListEkmConnectionsResponse;
+
+ /**
+ * Creates a plain object from a ListEkmConnectionsResponse message. Also converts values to other types if specified.
+ * @param message ListEkmConnectionsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListEkmConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListEkmConnectionsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListEkmConnectionsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetEkmConnectionRequest. */
+ interface IGetEkmConnectionRequest {
+
+ /** GetEkmConnectionRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetEkmConnectionRequest. */
+ class GetEkmConnectionRequest implements IGetEkmConnectionRequest {
+
+ /**
+ * Constructs a new GetEkmConnectionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetEkmConnectionRequest);
+
+ /** GetEkmConnectionRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetEkmConnectionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetEkmConnectionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetEkmConnectionRequest): google.cloud.kms.v1.GetEkmConnectionRequest;
+
+ /**
+ * Encodes the specified GetEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.GetEkmConnectionRequest.verify|verify} messages.
+ * @param message GetEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetEkmConnectionRequest.verify|verify} messages.
+ * @param message GetEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetEkmConnectionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetEkmConnectionRequest;
+
+ /**
+ * Decodes a GetEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetEkmConnectionRequest;
+
+ /**
+ * Verifies a GetEkmConnectionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetEkmConnectionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetEkmConnectionRequest;
+
+ /**
+ * Creates a plain object from a GetEkmConnectionRequest message. Also converts values to other types if specified.
+ * @param message GetEkmConnectionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetEkmConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetEkmConnectionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetEkmConnectionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateEkmConnectionRequest. */
+ interface ICreateEkmConnectionRequest {
+
+ /** CreateEkmConnectionRequest parent */
+ parent?: (string|null);
+
+ /** CreateEkmConnectionRequest ekmConnectionId */
+ ekmConnectionId?: (string|null);
+
+ /** CreateEkmConnectionRequest ekmConnection */
+ ekmConnection?: (google.cloud.kms.v1.IEkmConnection|null);
+ }
+
+ /** Represents a CreateEkmConnectionRequest. */
+ class CreateEkmConnectionRequest implements ICreateEkmConnectionRequest {
+
+ /**
+ * Constructs a new CreateEkmConnectionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICreateEkmConnectionRequest);
+
+ /** CreateEkmConnectionRequest parent. */
+ public parent: string;
+
+ /** CreateEkmConnectionRequest ekmConnectionId. */
+ public ekmConnectionId: string;
+
+ /** CreateEkmConnectionRequest ekmConnection. */
+ public ekmConnection?: (google.cloud.kms.v1.IEkmConnection|null);
+
+ /**
+ * Creates a new CreateEkmConnectionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateEkmConnectionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICreateEkmConnectionRequest): google.cloud.kms.v1.CreateEkmConnectionRequest;
+
+ /**
+ * Encodes the specified CreateEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateEkmConnectionRequest.verify|verify} messages.
+ * @param message CreateEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICreateEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateEkmConnectionRequest.verify|verify} messages.
+ * @param message CreateEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICreateEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateEkmConnectionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CreateEkmConnectionRequest;
+
+ /**
+ * Decodes a CreateEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CreateEkmConnectionRequest;
+
+ /**
+ * Verifies a CreateEkmConnectionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateEkmConnectionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CreateEkmConnectionRequest;
+
+ /**
+ * Creates a plain object from a CreateEkmConnectionRequest message. Also converts values to other types if specified.
+ * @param message CreateEkmConnectionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CreateEkmConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateEkmConnectionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateEkmConnectionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateEkmConnectionRequest. */
+ interface IUpdateEkmConnectionRequest {
+
+ /** UpdateEkmConnectionRequest ekmConnection */
+ ekmConnection?: (google.cloud.kms.v1.IEkmConnection|null);
+
+ /** UpdateEkmConnectionRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateEkmConnectionRequest. */
+ class UpdateEkmConnectionRequest implements IUpdateEkmConnectionRequest {
+
+ /**
+ * Constructs a new UpdateEkmConnectionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IUpdateEkmConnectionRequest);
+
+ /** UpdateEkmConnectionRequest ekmConnection. */
+ public ekmConnection?: (google.cloud.kms.v1.IEkmConnection|null);
+
+ /** UpdateEkmConnectionRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateEkmConnectionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateEkmConnectionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IUpdateEkmConnectionRequest): google.cloud.kms.v1.UpdateEkmConnectionRequest;
+
+ /**
+ * Encodes the specified UpdateEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateEkmConnectionRequest.verify|verify} messages.
+ * @param message UpdateEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IUpdateEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateEkmConnectionRequest.verify|verify} messages.
+ * @param message UpdateEkmConnectionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IUpdateEkmConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateEkmConnectionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.UpdateEkmConnectionRequest;
+
+ /**
+ * Decodes an UpdateEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.UpdateEkmConnectionRequest;
+
+ /**
+ * Verifies an UpdateEkmConnectionRequest message.
+ * @param message Plain 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 UpdateEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateEkmConnectionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.UpdateEkmConnectionRequest;
+
+ /**
+ * Creates a plain object from an UpdateEkmConnectionRequest message. Also converts values to other types if specified.
+ * @param message UpdateEkmConnectionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.UpdateEkmConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateEkmConnectionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateEkmConnectionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Certificate. */
+ interface ICertificate {
+
+ /** Certificate rawDer */
+ rawDer?: (Uint8Array|string|null);
+
+ /** Certificate parsed */
+ parsed?: (boolean|null);
+
+ /** Certificate issuer */
+ issuer?: (string|null);
+
+ /** Certificate subject */
+ subject?: (string|null);
+
+ /** Certificate subjectAlternativeDnsNames */
+ subjectAlternativeDnsNames?: (string[]|null);
+
+ /** Certificate notBeforeTime */
+ notBeforeTime?: (google.protobuf.ITimestamp|null);
+
+ /** Certificate notAfterTime */
+ notAfterTime?: (google.protobuf.ITimestamp|null);
+
+ /** Certificate serialNumber */
+ serialNumber?: (string|null);
+
+ /** Certificate sha256Fingerprint */
+ sha256Fingerprint?: (string|null);
+ }
+
+ /** Represents a Certificate. */
+ class Certificate implements ICertificate {
+
+ /**
+ * Constructs a new Certificate.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICertificate);
+
+ /** Certificate rawDer. */
+ public rawDer: (Uint8Array|string);
+
+ /** Certificate parsed. */
+ public parsed: boolean;
+
+ /** Certificate issuer. */
+ public issuer: string;
+
+ /** Certificate subject. */
+ public subject: string;
+
+ /** Certificate subjectAlternativeDnsNames. */
+ public subjectAlternativeDnsNames: string[];
+
+ /** Certificate notBeforeTime. */
+ public notBeforeTime?: (google.protobuf.ITimestamp|null);
+
+ /** Certificate notAfterTime. */
+ public notAfterTime?: (google.protobuf.ITimestamp|null);
+
+ /** Certificate serialNumber. */
+ public serialNumber: string;
+
+ /** Certificate sha256Fingerprint. */
+ public sha256Fingerprint: string;
+
+ /**
+ * Creates a new Certificate instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Certificate instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICertificate): google.cloud.kms.v1.Certificate;
+
+ /**
+ * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.kms.v1.Certificate.verify|verify} messages.
+ * @param message Certificate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.Certificate.verify|verify} messages.
+ * @param message Certificate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Certificate message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Certificate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.Certificate;
+
+ /**
+ * Decodes a Certificate message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Certificate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.Certificate;
+
+ /**
+ * Verifies a Certificate message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Certificate message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Certificate
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.Certificate;
+
+ /**
+ * Creates a plain object from a Certificate message. Also converts values to other types if specified.
+ * @param message Certificate
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.Certificate, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Certificate to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Certificate
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EkmConnection. */
+ interface IEkmConnection {
+
+ /** EkmConnection name */
+ name?: (string|null);
+
+ /** EkmConnection createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** EkmConnection serviceResolvers */
+ serviceResolvers?: (google.cloud.kms.v1.EkmConnection.IServiceResolver[]|null);
+
+ /** EkmConnection etag */
+ etag?: (string|null);
+ }
+
+ /** Represents an EkmConnection. */
+ class EkmConnection implements IEkmConnection {
+
+ /**
+ * Constructs a new EkmConnection.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IEkmConnection);
+
+ /** EkmConnection name. */
+ public name: string;
+
+ /** EkmConnection createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** EkmConnection serviceResolvers. */
+ public serviceResolvers: google.cloud.kms.v1.EkmConnection.IServiceResolver[];
+
+ /** EkmConnection etag. */
+ public etag: string;
+
+ /**
+ * Creates a new EkmConnection instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EkmConnection instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IEkmConnection): google.cloud.kms.v1.EkmConnection;
+
+ /**
+ * Encodes the specified EkmConnection message. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.verify|verify} messages.
+ * @param message EkmConnection message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IEkmConnection, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EkmConnection message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.verify|verify} messages.
+ * @param message EkmConnection message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IEkmConnection, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EkmConnection message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EkmConnection
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.EkmConnection;
+
+ /**
+ * Decodes an EkmConnection message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EkmConnection
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.EkmConnection;
+
+ /**
+ * Verifies an EkmConnection message.
+ * @param message Plain 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 EkmConnection message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EkmConnection
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.EkmConnection;
+
+ /**
+ * Creates a plain object from an EkmConnection message. Also converts values to other types if specified.
+ * @param message EkmConnection
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.EkmConnection, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EkmConnection to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EkmConnection
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace EkmConnection {
+
+ /** Properties of a ServiceResolver. */
+ interface IServiceResolver {
+
+ /** ServiceResolver serviceDirectoryService */
+ serviceDirectoryService?: (string|null);
+
+ /** ServiceResolver endpointFilter */
+ endpointFilter?: (string|null);
+
+ /** ServiceResolver hostname */
+ hostname?: (string|null);
+
+ /** ServiceResolver serverCertificates */
+ serverCertificates?: (google.cloud.kms.v1.ICertificate[]|null);
+ }
+
+ /** Represents a ServiceResolver. */
+ class ServiceResolver implements IServiceResolver {
+
+ /**
+ * Constructs a new ServiceResolver.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.EkmConnection.IServiceResolver);
+
+ /** ServiceResolver serviceDirectoryService. */
+ public serviceDirectoryService: string;
+
+ /** ServiceResolver endpointFilter. */
+ public endpointFilter: string;
+
+ /** ServiceResolver hostname. */
+ public hostname: string;
+
+ /** ServiceResolver serverCertificates. */
+ public serverCertificates: google.cloud.kms.v1.ICertificate[];
+
+ /**
+ * Creates a new ServiceResolver instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ServiceResolver instance
+ */
+ public static create(properties?: google.cloud.kms.v1.EkmConnection.IServiceResolver): google.cloud.kms.v1.EkmConnection.ServiceResolver;
+
+ /**
+ * Encodes the specified ServiceResolver message. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.ServiceResolver.verify|verify} messages.
+ * @param message ServiceResolver message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.EkmConnection.IServiceResolver, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ServiceResolver message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.ServiceResolver.verify|verify} messages.
+ * @param message ServiceResolver message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.EkmConnection.IServiceResolver, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ServiceResolver message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ServiceResolver
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.EkmConnection.ServiceResolver;
+
+ /**
+ * Decodes a ServiceResolver message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ServiceResolver
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.EkmConnection.ServiceResolver;
+
+ /**
+ * Verifies a ServiceResolver message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ServiceResolver message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ServiceResolver
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.EkmConnection.ServiceResolver;
+
+ /**
+ * Creates a plain object from a ServiceResolver message. Also converts values to other types if specified.
+ * @param message ServiceResolver
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.EkmConnection.ServiceResolver, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ServiceResolver to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ServiceResolver
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a KeyRing. */
+ interface IKeyRing {
+
+ /** KeyRing name */
+ name?: (string|null);
+
+ /** KeyRing createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+ }
+
+ /** Represents a KeyRing. */
+ class KeyRing implements IKeyRing {
+
+ /**
+ * Constructs a new KeyRing.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IKeyRing);
+
+ /** KeyRing name. */
+ public name: string;
+
+ /** KeyRing createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /**
+ * Creates a new KeyRing instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns KeyRing instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IKeyRing): google.cloud.kms.v1.KeyRing;
+
+ /**
+ * Encodes the specified KeyRing message. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages.
+ * @param message KeyRing message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IKeyRing, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified KeyRing message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages.
+ * @param message KeyRing message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IKeyRing, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a KeyRing message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns KeyRing
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyRing;
+
+ /**
+ * Decodes a KeyRing message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns KeyRing
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyRing;
+
+ /**
+ * Verifies a KeyRing message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a KeyRing message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns KeyRing
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyRing;
+
+ /**
+ * Creates a plain object from a KeyRing message. Also converts values to other types if specified.
+ * @param message KeyRing
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.KeyRing, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this KeyRing to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for KeyRing
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CryptoKey. */
+ interface ICryptoKey {
+
+ /** CryptoKey name */
+ name?: (string|null);
+
+ /** CryptoKey primary */
+ primary?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+
+ /** CryptoKey purpose */
+ purpose?: (google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|keyof typeof google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|null);
+
+ /** CryptoKey createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKey nextRotationTime */
+ nextRotationTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKey rotationPeriod */
+ rotationPeriod?: (google.protobuf.IDuration|null);
+
+ /** CryptoKey versionTemplate */
+ versionTemplate?: (google.cloud.kms.v1.ICryptoKeyVersionTemplate|null);
+
+ /** CryptoKey labels */
+ labels?: ({ [k: string]: string }|null);
+
+ /** CryptoKey importOnly */
+ importOnly?: (boolean|null);
+
+ /** CryptoKey destroyScheduledDuration */
+ destroyScheduledDuration?: (google.protobuf.IDuration|null);
+
+ /** CryptoKey cryptoKeyBackend */
+ cryptoKeyBackend?: (string|null);
+ }
+
+ /** Represents a CryptoKey. */
+ class CryptoKey implements ICryptoKey {
+
+ /**
+ * Constructs a new CryptoKey.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICryptoKey);
+
+ /** CryptoKey name. */
+ public name: string;
+
+ /** CryptoKey primary. */
+ public primary?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+
+ /** CryptoKey purpose. */
+ public purpose: (google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|keyof typeof google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose);
+
+ /** CryptoKey createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKey nextRotationTime. */
+ public nextRotationTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKey rotationPeriod. */
+ public rotationPeriod?: (google.protobuf.IDuration|null);
+
+ /** CryptoKey versionTemplate. */
+ public versionTemplate?: (google.cloud.kms.v1.ICryptoKeyVersionTemplate|null);
+
+ /** CryptoKey labels. */
+ public labels: { [k: string]: string };
+
+ /** CryptoKey importOnly. */
+ public importOnly: boolean;
+
+ /** CryptoKey destroyScheduledDuration. */
+ public destroyScheduledDuration?: (google.protobuf.IDuration|null);
+
+ /** CryptoKey cryptoKeyBackend. */
+ public cryptoKeyBackend: string;
+
+ /** CryptoKey rotationSchedule. */
+ public rotationSchedule?: "rotationPeriod";
+
+ /**
+ * Creates a new CryptoKey instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CryptoKey instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICryptoKey): google.cloud.kms.v1.CryptoKey;
+
+ /**
+ * Encodes the specified CryptoKey message. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages.
+ * @param message CryptoKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages.
+ * @param message CryptoKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CryptoKey message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CryptoKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKey;
+
+ /**
+ * Decodes a CryptoKey message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CryptoKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKey;
+
+ /**
+ * Verifies a CryptoKey message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CryptoKey
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKey;
+
+ /**
+ * Creates a plain object from a CryptoKey message. Also converts values to other types if specified.
+ * @param message CryptoKey
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CryptoKey to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CryptoKey
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace CryptoKey {
+
+ /** CryptoKeyPurpose enum. */
+ enum CryptoKeyPurpose {
+ CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0,
+ ENCRYPT_DECRYPT = 1,
+ ASYMMETRIC_SIGN = 5,
+ ASYMMETRIC_DECRYPT = 6,
+ MAC = 9
+ }
+ }
+
+ /** Properties of a CryptoKeyVersionTemplate. */
+ interface ICryptoKeyVersionTemplate {
+
+ /** CryptoKeyVersionTemplate protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+
+ /** CryptoKeyVersionTemplate algorithm */
+ algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null);
+ }
+
+ /** Represents a CryptoKeyVersionTemplate. */
+ class CryptoKeyVersionTemplate implements ICryptoKeyVersionTemplate {
+
+ /**
+ * Constructs a new CryptoKeyVersionTemplate.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICryptoKeyVersionTemplate);
+
+ /** CryptoKeyVersionTemplate protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /** CryptoKeyVersionTemplate algorithm. */
+ public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm);
+
+ /**
+ * Creates a new CryptoKeyVersionTemplate instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CryptoKeyVersionTemplate instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICryptoKeyVersionTemplate): google.cloud.kms.v1.CryptoKeyVersionTemplate;
+
+ /**
+ * Encodes the specified CryptoKeyVersionTemplate message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages.
+ * @param message CryptoKeyVersionTemplate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICryptoKeyVersionTemplate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CryptoKeyVersionTemplate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages.
+ * @param message CryptoKeyVersionTemplate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKeyVersionTemplate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CryptoKeyVersionTemplate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKeyVersionTemplate;
+
+ /**
+ * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CryptoKeyVersionTemplate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKeyVersionTemplate;
+
+ /**
+ * Verifies a CryptoKeyVersionTemplate message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CryptoKeyVersionTemplate message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CryptoKeyVersionTemplate
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKeyVersionTemplate;
+
+ /**
+ * Creates a plain object from a CryptoKeyVersionTemplate message. Also converts values to other types if specified.
+ * @param message CryptoKeyVersionTemplate
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CryptoKeyVersionTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CryptoKeyVersionTemplate to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CryptoKeyVersionTemplate
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a KeyOperationAttestation. */
+ interface IKeyOperationAttestation {
+
+ /** KeyOperationAttestation format */
+ format?: (google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|keyof typeof google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|null);
+
+ /** KeyOperationAttestation content */
+ content?: (Uint8Array|string|null);
+
+ /** KeyOperationAttestation certChains */
+ certChains?: (google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null);
+ }
+
+ /** Represents a KeyOperationAttestation. */
+ class KeyOperationAttestation implements IKeyOperationAttestation {
+
+ /**
+ * Constructs a new KeyOperationAttestation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IKeyOperationAttestation);
+
+ /** KeyOperationAttestation format. */
+ public format: (google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|keyof typeof google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat);
+
+ /** KeyOperationAttestation content. */
+ public content: (Uint8Array|string);
+
+ /** KeyOperationAttestation certChains. */
+ public certChains?: (google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null);
+
+ /**
+ * Creates a new KeyOperationAttestation instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns KeyOperationAttestation instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IKeyOperationAttestation): google.cloud.kms.v1.KeyOperationAttestation;
+
+ /**
+ * Encodes the specified KeyOperationAttestation message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages.
+ * @param message KeyOperationAttestation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IKeyOperationAttestation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified KeyOperationAttestation message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages.
+ * @param message KeyOperationAttestation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IKeyOperationAttestation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a KeyOperationAttestation message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns KeyOperationAttestation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyOperationAttestation;
+
+ /**
+ * Decodes a KeyOperationAttestation message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns KeyOperationAttestation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyOperationAttestation;
+
+ /**
+ * Verifies a KeyOperationAttestation message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a KeyOperationAttestation message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns KeyOperationAttestation
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyOperationAttestation;
+
+ /**
+ * Creates a plain object from a KeyOperationAttestation message. Also converts values to other types if specified.
+ * @param message KeyOperationAttestation
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.KeyOperationAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this KeyOperationAttestation to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for KeyOperationAttestation
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace KeyOperationAttestation {
+
+ /** AttestationFormat enum. */
+ enum AttestationFormat {
+ ATTESTATION_FORMAT_UNSPECIFIED = 0,
+ CAVIUM_V1_COMPRESSED = 3,
+ CAVIUM_V2_COMPRESSED = 4
+ }
+
+ /** Properties of a CertificateChains. */
+ interface ICertificateChains {
+
+ /** CertificateChains caviumCerts */
+ caviumCerts?: (string[]|null);
+
+ /** CertificateChains googleCardCerts */
+ googleCardCerts?: (string[]|null);
+
+ /** CertificateChains googlePartitionCerts */
+ googlePartitionCerts?: (string[]|null);
+ }
+
+ /** Represents a CertificateChains. */
+ class CertificateChains implements ICertificateChains {
+
+ /**
+ * Constructs a new CertificateChains.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains);
+
+ /** CertificateChains caviumCerts. */
+ public caviumCerts: string[];
+
+ /** CertificateChains googleCardCerts. */
+ public googleCardCerts: string[];
+
+ /** CertificateChains googlePartitionCerts. */
+ public googlePartitionCerts: string[];
+
+ /**
+ * Creates a new CertificateChains instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CertificateChains instance
+ */
+ public static create(properties?: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains;
+
+ /**
+ * Encodes the specified CertificateChains message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages.
+ * @param message CertificateChains message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CertificateChains message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages.
+ * @param message CertificateChains message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CertificateChains message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CertificateChains
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains;
+
+ /**
+ * Decodes a CertificateChains message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CertificateChains
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains;
+
+ /**
+ * Verifies a CertificateChains message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CertificateChains message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CertificateChains
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.KeyOperationAttestation.CertificateChains;
+
+ /**
+ * Creates a plain object from a CertificateChains message. Also converts values to other types if specified.
+ * @param message CertificateChains
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.KeyOperationAttestation.CertificateChains, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CertificateChains to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CertificateChains
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a CryptoKeyVersion. */
+ interface ICryptoKeyVersion {
+
+ /** CryptoKeyVersion name */
+ name?: (string|null);
+
+ /** CryptoKeyVersion state */
+ state?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|null);
+
+ /** CryptoKeyVersion protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+
+ /** CryptoKeyVersion algorithm */
+ algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null);
+
+ /** CryptoKeyVersion attestation */
+ attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null);
+
+ /** CryptoKeyVersion createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion generateTime */
+ generateTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion destroyTime */
+ destroyTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion destroyEventTime */
+ destroyEventTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion importJob */
+ importJob?: (string|null);
+
+ /** CryptoKeyVersion importTime */
+ importTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion importFailureReason */
+ importFailureReason?: (string|null);
+
+ /** CryptoKeyVersion externalProtectionLevelOptions */
+ externalProtectionLevelOptions?: (google.cloud.kms.v1.IExternalProtectionLevelOptions|null);
+
+ /** CryptoKeyVersion reimportEligible */
+ reimportEligible?: (boolean|null);
+ }
+
+ /** Represents a CryptoKeyVersion. */
+ class CryptoKeyVersion implements ICryptoKeyVersion {
+
+ /**
+ * Constructs a new CryptoKeyVersion.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICryptoKeyVersion);
+
+ /** CryptoKeyVersion name. */
+ public name: string;
+
+ /** CryptoKeyVersion state. */
+ public state: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState);
+
+ /** CryptoKeyVersion protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /** CryptoKeyVersion algorithm. */
+ public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm);
+
+ /** CryptoKeyVersion attestation. */
+ public attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null);
+
+ /** CryptoKeyVersion createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion generateTime. */
+ public generateTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion destroyTime. */
+ public destroyTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion destroyEventTime. */
+ public destroyEventTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion importJob. */
+ public importJob: string;
+
+ /** CryptoKeyVersion importTime. */
+ public importTime?: (google.protobuf.ITimestamp|null);
+
+ /** CryptoKeyVersion importFailureReason. */
+ public importFailureReason: string;
+
+ /** CryptoKeyVersion externalProtectionLevelOptions. */
+ public externalProtectionLevelOptions?: (google.cloud.kms.v1.IExternalProtectionLevelOptions|null);
+
+ /** CryptoKeyVersion reimportEligible. */
+ public reimportEligible: boolean;
+
+ /**
+ * Creates a new CryptoKeyVersion instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CryptoKeyVersion instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICryptoKeyVersion): google.cloud.kms.v1.CryptoKeyVersion;
+
+ /**
+ * Encodes the specified CryptoKeyVersion message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages.
+ * @param message CryptoKeyVersion message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICryptoKeyVersion, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CryptoKeyVersion message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages.
+ * @param message CryptoKeyVersion message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICryptoKeyVersion, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CryptoKeyVersion message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CryptoKeyVersion
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CryptoKeyVersion;
+
+ /**
+ * Decodes a CryptoKeyVersion message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CryptoKeyVersion
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CryptoKeyVersion;
+
+ /**
+ * Verifies a CryptoKeyVersion message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CryptoKeyVersion message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CryptoKeyVersion
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CryptoKeyVersion;
+
+ /**
+ * Creates a plain object from a CryptoKeyVersion message. Also converts values to other types if specified.
+ * @param message CryptoKeyVersion
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CryptoKeyVersion, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CryptoKeyVersion to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CryptoKeyVersion
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace CryptoKeyVersion {
+
+ /** CryptoKeyVersionAlgorithm enum. */
+ enum CryptoKeyVersionAlgorithm {
+ CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0,
+ GOOGLE_SYMMETRIC_ENCRYPTION = 1,
+ RSA_SIGN_PSS_2048_SHA256 = 2,
+ RSA_SIGN_PSS_3072_SHA256 = 3,
+ RSA_SIGN_PSS_4096_SHA256 = 4,
+ RSA_SIGN_PSS_4096_SHA512 = 15,
+ RSA_SIGN_PKCS1_2048_SHA256 = 5,
+ RSA_SIGN_PKCS1_3072_SHA256 = 6,
+ RSA_SIGN_PKCS1_4096_SHA256 = 7,
+ RSA_SIGN_PKCS1_4096_SHA512 = 16,
+ RSA_SIGN_RAW_PKCS1_2048 = 28,
+ RSA_SIGN_RAW_PKCS1_3072 = 29,
+ RSA_SIGN_RAW_PKCS1_4096 = 30,
+ RSA_DECRYPT_OAEP_2048_SHA256 = 8,
+ RSA_DECRYPT_OAEP_3072_SHA256 = 9,
+ RSA_DECRYPT_OAEP_4096_SHA256 = 10,
+ RSA_DECRYPT_OAEP_4096_SHA512 = 17,
+ RSA_DECRYPT_OAEP_2048_SHA1 = 37,
+ RSA_DECRYPT_OAEP_3072_SHA1 = 38,
+ RSA_DECRYPT_OAEP_4096_SHA1 = 39,
+ EC_SIGN_P256_SHA256 = 12,
+ EC_SIGN_P384_SHA384 = 13,
+ EC_SIGN_SECP256K1_SHA256 = 31,
+ HMAC_SHA256 = 32,
+ EXTERNAL_SYMMETRIC_ENCRYPTION = 18
+ }
+
+ /** CryptoKeyVersionState enum. */
+ enum CryptoKeyVersionState {
+ CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0,
+ PENDING_GENERATION = 5,
+ ENABLED = 1,
+ DISABLED = 2,
+ DESTROYED = 3,
+ DESTROY_SCHEDULED = 4,
+ PENDING_IMPORT = 6,
+ IMPORT_FAILED = 7
+ }
+
+ /** CryptoKeyVersionView enum. */
+ enum CryptoKeyVersionView {
+ CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0,
+ FULL = 1
+ }
+ }
+
+ /** Properties of a PublicKey. */
+ interface IPublicKey {
+
+ /** PublicKey pem */
+ pem?: (string|null);
+
+ /** PublicKey algorithm */
+ algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null);
+
+ /** PublicKey pemCrc32c */
+ pemCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** PublicKey name */
+ name?: (string|null);
+
+ /** PublicKey protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents a PublicKey. */
+ class PublicKey implements IPublicKey {
+
+ /**
+ * Constructs a new PublicKey.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IPublicKey);
+
+ /** PublicKey pem. */
+ public pem: string;
+
+ /** PublicKey algorithm. */
+ public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm);
+
+ /** PublicKey pemCrc32c. */
+ public pemCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** PublicKey name. */
+ public name: string;
+
+ /** PublicKey protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new PublicKey instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PublicKey instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IPublicKey): google.cloud.kms.v1.PublicKey;
+
+ /**
+ * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages.
+ * @param message PublicKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages.
+ * @param message PublicKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PublicKey message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.PublicKey;
+
+ /**
+ * Decodes a PublicKey message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.PublicKey;
+
+ /**
+ * Verifies a PublicKey message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PublicKey message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PublicKey
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.PublicKey;
+
+ /**
+ * Creates a plain object from a PublicKey message. Also converts values to other types if specified.
+ * @param message PublicKey
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PublicKey to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PublicKey
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportJob. */
+ interface IImportJob {
+
+ /** ImportJob name */
+ name?: (string|null);
+
+ /** ImportJob importMethod */
+ importMethod?: (google.cloud.kms.v1.ImportJob.ImportMethod|keyof typeof google.cloud.kms.v1.ImportJob.ImportMethod|null);
+
+ /** ImportJob protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+
+ /** ImportJob createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob generateTime */
+ generateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob expireTime */
+ expireTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob expireEventTime */
+ expireEventTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob state */
+ state?: (google.cloud.kms.v1.ImportJob.ImportJobState|keyof typeof google.cloud.kms.v1.ImportJob.ImportJobState|null);
+
+ /** ImportJob publicKey */
+ publicKey?: (google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null);
+
+ /** ImportJob attestation */
+ attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null);
+ }
+
+ /** Represents an ImportJob. */
+ class ImportJob implements IImportJob {
+
+ /**
+ * Constructs a new ImportJob.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IImportJob);
+
+ /** ImportJob name. */
+ public name: string;
+
+ /** ImportJob importMethod. */
+ public importMethod: (google.cloud.kms.v1.ImportJob.ImportMethod|keyof typeof google.cloud.kms.v1.ImportJob.ImportMethod);
+
+ /** ImportJob protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /** ImportJob createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob generateTime. */
+ public generateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob expireTime. */
+ public expireTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob expireEventTime. */
+ public expireEventTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportJob state. */
+ public state: (google.cloud.kms.v1.ImportJob.ImportJobState|keyof typeof google.cloud.kms.v1.ImportJob.ImportJobState);
+
+ /** ImportJob publicKey. */
+ public publicKey?: (google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null);
+
+ /** ImportJob attestation. */
+ public attestation?: (google.cloud.kms.v1.IKeyOperationAttestation|null);
+
+ /**
+ * Creates a new ImportJob instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportJob instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IImportJob): google.cloud.kms.v1.ImportJob;
+
+ /**
+ * Encodes the specified ImportJob message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages.
+ * @param message ImportJob message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IImportJob, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportJob message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages.
+ * @param message ImportJob message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IImportJob, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportJob message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportJob
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ImportJob;
+
+ /**
+ * Decodes an ImportJob message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportJob
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ImportJob;
+
+ /**
+ * Verifies an ImportJob message.
+ * @param message Plain 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 ImportJob message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportJob
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ImportJob;
+
+ /**
+ * Creates a plain object from an ImportJob message. Also converts values to other types if specified.
+ * @param message ImportJob
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ImportJob, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportJob to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportJob
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ImportJob {
+
+ /** ImportMethod enum. */
+ enum ImportMethod {
+ IMPORT_METHOD_UNSPECIFIED = 0,
+ RSA_OAEP_3072_SHA1_AES_256 = 1,
+ RSA_OAEP_4096_SHA1_AES_256 = 2
+ }
+
+ /** ImportJobState enum. */
+ enum ImportJobState {
+ IMPORT_JOB_STATE_UNSPECIFIED = 0,
+ PENDING_GENERATION = 1,
+ ACTIVE = 2,
+ EXPIRED = 3
+ }
+
+ /** Properties of a WrappingPublicKey. */
+ interface IWrappingPublicKey {
+
+ /** WrappingPublicKey pem */
+ pem?: (string|null);
+ }
+
+ /** Represents a WrappingPublicKey. */
+ class WrappingPublicKey implements IWrappingPublicKey {
+
+ /**
+ * Constructs a new WrappingPublicKey.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ImportJob.IWrappingPublicKey);
+
+ /** WrappingPublicKey pem. */
+ public pem: string;
+
+ /**
+ * Creates a new WrappingPublicKey instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns WrappingPublicKey instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ImportJob.IWrappingPublicKey): google.cloud.kms.v1.ImportJob.WrappingPublicKey;
+
+ /**
+ * Encodes the specified WrappingPublicKey message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages.
+ * @param message WrappingPublicKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ImportJob.IWrappingPublicKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified WrappingPublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages.
+ * @param message WrappingPublicKey message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ImportJob.IWrappingPublicKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a WrappingPublicKey message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns WrappingPublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ImportJob.WrappingPublicKey;
+
+ /**
+ * Decodes a WrappingPublicKey message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns WrappingPublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ImportJob.WrappingPublicKey;
+
+ /**
+ * Verifies a WrappingPublicKey message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a WrappingPublicKey message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns WrappingPublicKey
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ImportJob.WrappingPublicKey;
+
+ /**
+ * Creates a plain object from a WrappingPublicKey message. Also converts values to other types if specified.
+ * @param message WrappingPublicKey
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ImportJob.WrappingPublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this WrappingPublicKey to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for WrappingPublicKey
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an ExternalProtectionLevelOptions. */
+ interface IExternalProtectionLevelOptions {
+
+ /** ExternalProtectionLevelOptions externalKeyUri */
+ externalKeyUri?: (string|null);
+
+ /** ExternalProtectionLevelOptions ekmConnectionKeyPath */
+ ekmConnectionKeyPath?: (string|null);
+ }
+
+ /** Represents an ExternalProtectionLevelOptions. */
+ class ExternalProtectionLevelOptions implements IExternalProtectionLevelOptions {
+
+ /**
+ * Constructs a new ExternalProtectionLevelOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IExternalProtectionLevelOptions);
+
+ /** ExternalProtectionLevelOptions externalKeyUri. */
+ public externalKeyUri: string;
+
+ /** ExternalProtectionLevelOptions ekmConnectionKeyPath. */
+ public ekmConnectionKeyPath: string;
+
+ /**
+ * Creates a new ExternalProtectionLevelOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ExternalProtectionLevelOptions instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IExternalProtectionLevelOptions): google.cloud.kms.v1.ExternalProtectionLevelOptions;
+
+ /**
+ * Encodes the specified ExternalProtectionLevelOptions message. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages.
+ * @param message ExternalProtectionLevelOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IExternalProtectionLevelOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ExternalProtectionLevelOptions message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages.
+ * @param message ExternalProtectionLevelOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IExternalProtectionLevelOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ExternalProtectionLevelOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ExternalProtectionLevelOptions;
+
+ /**
+ * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ExternalProtectionLevelOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ExternalProtectionLevelOptions;
+
+ /**
+ * Verifies an ExternalProtectionLevelOptions message.
+ * @param message Plain 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 ExternalProtectionLevelOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ExternalProtectionLevelOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ExternalProtectionLevelOptions;
+
+ /**
+ * Creates a plain object from an ExternalProtectionLevelOptions message. Also converts values to other types if specified.
+ * @param message ExternalProtectionLevelOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ExternalProtectionLevelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ExternalProtectionLevelOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ExternalProtectionLevelOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** ProtectionLevel enum. */
+ enum ProtectionLevel {
+ PROTECTION_LEVEL_UNSPECIFIED = 0,
+ SOFTWARE = 1,
+ HSM = 2,
+ EXTERNAL = 3,
+ EXTERNAL_VPC = 4
+ }
+
+ /** Represents a KeyManagementService */
+ class KeyManagementService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new KeyManagementService 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 KeyManagementService 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): KeyManagementService;
+
+ /**
+ * Calls ListKeyRings.
+ * @param request ListKeyRingsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListKeyRingsResponse
+ */
+ public listKeyRings(request: google.cloud.kms.v1.IListKeyRingsRequest, callback: google.cloud.kms.v1.KeyManagementService.ListKeyRingsCallback): void;
+
+ /**
+ * Calls ListKeyRings.
+ * @param request ListKeyRingsRequest message or plain object
+ * @returns Promise
+ */
+ public listKeyRings(request: google.cloud.kms.v1.IListKeyRingsRequest): Promise;
+
+ /**
+ * Calls ListCryptoKeys.
+ * @param request ListCryptoKeysRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListCryptoKeysResponse
+ */
+ public listCryptoKeys(request: google.cloud.kms.v1.IListCryptoKeysRequest, callback: google.cloud.kms.v1.KeyManagementService.ListCryptoKeysCallback): void;
+
+ /**
+ * Calls ListCryptoKeys.
+ * @param request ListCryptoKeysRequest message or plain object
+ * @returns Promise
+ */
+ public listCryptoKeys(request: google.cloud.kms.v1.IListCryptoKeysRequest): Promise;
+
+ /**
+ * Calls ListCryptoKeyVersions.
+ * @param request ListCryptoKeyVersionsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListCryptoKeyVersionsResponse
+ */
+ public listCryptoKeyVersions(request: google.cloud.kms.v1.IListCryptoKeyVersionsRequest, callback: google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersionsCallback): void;
+
+ /**
+ * Calls ListCryptoKeyVersions.
+ * @param request ListCryptoKeyVersionsRequest message or plain object
+ * @returns Promise
+ */
+ public listCryptoKeyVersions(request: google.cloud.kms.v1.IListCryptoKeyVersionsRequest): Promise;
+
+ /**
+ * Calls ListImportJobs.
+ * @param request ListImportJobsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListImportJobsResponse
+ */
+ public listImportJobs(request: google.cloud.kms.v1.IListImportJobsRequest, callback: google.cloud.kms.v1.KeyManagementService.ListImportJobsCallback): void;
+
+ /**
+ * Calls ListImportJobs.
+ * @param request ListImportJobsRequest message or plain object
+ * @returns Promise
+ */
+ public listImportJobs(request: google.cloud.kms.v1.IListImportJobsRequest): Promise;
+
+ /**
+ * Calls GetKeyRing.
+ * @param request GetKeyRingRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and KeyRing
+ */
+ public getKeyRing(request: google.cloud.kms.v1.IGetKeyRingRequest, callback: google.cloud.kms.v1.KeyManagementService.GetKeyRingCallback): void;
+
+ /**
+ * Calls GetKeyRing.
+ * @param request GetKeyRingRequest message or plain object
+ * @returns Promise
+ */
+ public getKeyRing(request: google.cloud.kms.v1.IGetKeyRingRequest): Promise;
+
+ /**
+ * Calls GetCryptoKey.
+ * @param request GetCryptoKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKey
+ */
+ public getCryptoKey(request: google.cloud.kms.v1.IGetCryptoKeyRequest, callback: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyCallback): void;
+
+ /**
+ * Calls GetCryptoKey.
+ * @param request GetCryptoKeyRequest message or plain object
+ * @returns Promise
+ */
+ public getCryptoKey(request: google.cloud.kms.v1.IGetCryptoKeyRequest): Promise;
+
+ /**
+ * Calls GetCryptoKeyVersion.
+ * @param request GetCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public getCryptoKeyVersion(request: google.cloud.kms.v1.IGetCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls GetCryptoKeyVersion.
+ * @param request GetCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public getCryptoKeyVersion(request: google.cloud.kms.v1.IGetCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls GetPublicKey.
+ * @param request GetPublicKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and PublicKey
+ */
+ public getPublicKey(request: google.cloud.kms.v1.IGetPublicKeyRequest, callback: google.cloud.kms.v1.KeyManagementService.GetPublicKeyCallback): void;
+
+ /**
+ * Calls GetPublicKey.
+ * @param request GetPublicKeyRequest message or plain object
+ * @returns Promise
+ */
+ public getPublicKey(request: google.cloud.kms.v1.IGetPublicKeyRequest): Promise;
+
+ /**
+ * Calls GetImportJob.
+ * @param request GetImportJobRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ImportJob
+ */
+ public getImportJob(request: google.cloud.kms.v1.IGetImportJobRequest, callback: google.cloud.kms.v1.KeyManagementService.GetImportJobCallback): void;
+
+ /**
+ * Calls GetImportJob.
+ * @param request GetImportJobRequest message or plain object
+ * @returns Promise
+ */
+ public getImportJob(request: google.cloud.kms.v1.IGetImportJobRequest): Promise;
+
+ /**
+ * Calls CreateKeyRing.
+ * @param request CreateKeyRingRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and KeyRing
+ */
+ public createKeyRing(request: google.cloud.kms.v1.ICreateKeyRingRequest, callback: google.cloud.kms.v1.KeyManagementService.CreateKeyRingCallback): void;
+
+ /**
+ * Calls CreateKeyRing.
+ * @param request CreateKeyRingRequest message or plain object
+ * @returns Promise
+ */
+ public createKeyRing(request: google.cloud.kms.v1.ICreateKeyRingRequest): Promise;
+
+ /**
+ * Calls CreateCryptoKey.
+ * @param request CreateCryptoKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKey
+ */
+ public createCryptoKey(request: google.cloud.kms.v1.ICreateCryptoKeyRequest, callback: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyCallback): void;
+
+ /**
+ * Calls CreateCryptoKey.
+ * @param request CreateCryptoKeyRequest message or plain object
+ * @returns Promise
+ */
+ public createCryptoKey(request: google.cloud.kms.v1.ICreateCryptoKeyRequest): Promise;
+
+ /**
+ * Calls CreateCryptoKeyVersion.
+ * @param request CreateCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public createCryptoKeyVersion(request: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls CreateCryptoKeyVersion.
+ * @param request CreateCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public createCryptoKeyVersion(request: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls ImportCryptoKeyVersion.
+ * @param request ImportCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public importCryptoKeyVersion(request: google.cloud.kms.v1.IImportCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls ImportCryptoKeyVersion.
+ * @param request ImportCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public importCryptoKeyVersion(request: google.cloud.kms.v1.IImportCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls CreateImportJob.
+ * @param request CreateImportJobRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ImportJob
+ */
+ public createImportJob(request: google.cloud.kms.v1.ICreateImportJobRequest, callback: google.cloud.kms.v1.KeyManagementService.CreateImportJobCallback): void;
+
+ /**
+ * Calls CreateImportJob.
+ * @param request CreateImportJobRequest message or plain object
+ * @returns Promise
+ */
+ public createImportJob(request: google.cloud.kms.v1.ICreateImportJobRequest): Promise;
+
+ /**
+ * Calls UpdateCryptoKey.
+ * @param request UpdateCryptoKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKey
+ */
+ public updateCryptoKey(request: google.cloud.kms.v1.IUpdateCryptoKeyRequest, callback: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyCallback): void;
+
+ /**
+ * Calls UpdateCryptoKey.
+ * @param request UpdateCryptoKeyRequest message or plain object
+ * @returns Promise
+ */
+ public updateCryptoKey(request: google.cloud.kms.v1.IUpdateCryptoKeyRequest): Promise;
+
+ /**
+ * Calls UpdateCryptoKeyVersion.
+ * @param request UpdateCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public updateCryptoKeyVersion(request: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls UpdateCryptoKeyVersion.
+ * @param request UpdateCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public updateCryptoKeyVersion(request: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls UpdateCryptoKeyPrimaryVersion.
+ * @param request UpdateCryptoKeyPrimaryVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKey
+ */
+ public updateCryptoKeyPrimaryVersion(request: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersionCallback): void;
+
+ /**
+ * Calls UpdateCryptoKeyPrimaryVersion.
+ * @param request UpdateCryptoKeyPrimaryVersionRequest message or plain object
+ * @returns Promise
+ */
+ public updateCryptoKeyPrimaryVersion(request: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest): Promise;
+
+ /**
+ * Calls DestroyCryptoKeyVersion.
+ * @param request DestroyCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public destroyCryptoKeyVersion(request: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls DestroyCryptoKeyVersion.
+ * @param request DestroyCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public destroyCryptoKeyVersion(request: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls RestoreCryptoKeyVersion.
+ * @param request RestoreCryptoKeyVersionRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ */
+ public restoreCryptoKeyVersion(request: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest, callback: google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersionCallback): void;
+
+ /**
+ * Calls RestoreCryptoKeyVersion.
+ * @param request RestoreCryptoKeyVersionRequest message or plain object
+ * @returns Promise
+ */
+ public restoreCryptoKeyVersion(request: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest): Promise;
+
+ /**
+ * Calls Encrypt.
+ * @param request EncryptRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and EncryptResponse
+ */
+ public encrypt(request: google.cloud.kms.v1.IEncryptRequest, callback: google.cloud.kms.v1.KeyManagementService.EncryptCallback): void;
+
+ /**
+ * Calls Encrypt.
+ * @param request EncryptRequest message or plain object
+ * @returns Promise
+ */
+ public encrypt(request: google.cloud.kms.v1.IEncryptRequest): Promise;
+
+ /**
+ * Calls Decrypt.
+ * @param request DecryptRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and DecryptResponse
+ */
+ public decrypt(request: google.cloud.kms.v1.IDecryptRequest, callback: google.cloud.kms.v1.KeyManagementService.DecryptCallback): void;
+
+ /**
+ * Calls Decrypt.
+ * @param request DecryptRequest message or plain object
+ * @returns Promise
+ */
+ public decrypt(request: google.cloud.kms.v1.IDecryptRequest): Promise;
+
+ /**
+ * Calls AsymmetricSign.
+ * @param request AsymmetricSignRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and AsymmetricSignResponse
+ */
+ public asymmetricSign(request: google.cloud.kms.v1.IAsymmetricSignRequest, callback: google.cloud.kms.v1.KeyManagementService.AsymmetricSignCallback): void;
+
+ /**
+ * Calls AsymmetricSign.
+ * @param request AsymmetricSignRequest message or plain object
+ * @returns Promise
+ */
+ public asymmetricSign(request: google.cloud.kms.v1.IAsymmetricSignRequest): Promise;
+
+ /**
+ * Calls AsymmetricDecrypt.
+ * @param request AsymmetricDecryptRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and AsymmetricDecryptResponse
+ */
+ public asymmetricDecrypt(request: google.cloud.kms.v1.IAsymmetricDecryptRequest, callback: google.cloud.kms.v1.KeyManagementService.AsymmetricDecryptCallback): void;
+
+ /**
+ * Calls AsymmetricDecrypt.
+ * @param request AsymmetricDecryptRequest message or plain object
+ * @returns Promise
+ */
+ public asymmetricDecrypt(request: google.cloud.kms.v1.IAsymmetricDecryptRequest): Promise;
+
+ /**
+ * Calls MacSign.
+ * @param request MacSignRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and MacSignResponse
+ */
+ public macSign(request: google.cloud.kms.v1.IMacSignRequest, callback: google.cloud.kms.v1.KeyManagementService.MacSignCallback): void;
+
+ /**
+ * Calls MacSign.
+ * @param request MacSignRequest message or plain object
+ * @returns Promise
+ */
+ public macSign(request: google.cloud.kms.v1.IMacSignRequest): Promise;
+
+ /**
+ * Calls MacVerify.
+ * @param request MacVerifyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and MacVerifyResponse
+ */
+ public macVerify(request: google.cloud.kms.v1.IMacVerifyRequest, callback: google.cloud.kms.v1.KeyManagementService.MacVerifyCallback): void;
+
+ /**
+ * Calls MacVerify.
+ * @param request MacVerifyRequest message or plain object
+ * @returns Promise
+ */
+ public macVerify(request: google.cloud.kms.v1.IMacVerifyRequest): Promise;
+
+ /**
+ * Calls GenerateRandomBytes.
+ * @param request GenerateRandomBytesRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and GenerateRandomBytesResponse
+ */
+ public generateRandomBytes(request: google.cloud.kms.v1.IGenerateRandomBytesRequest, callback: google.cloud.kms.v1.KeyManagementService.GenerateRandomBytesCallback): void;
+
+ /**
+ * Calls GenerateRandomBytes.
+ * @param request GenerateRandomBytesRequest message or plain object
+ * @returns Promise
+ */
+ public generateRandomBytes(request: google.cloud.kms.v1.IGenerateRandomBytesRequest): Promise;
+ }
+
+ namespace KeyManagementService {
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listKeyRings}.
+ * @param error Error, if any
+ * @param [response] ListKeyRingsResponse
+ */
+ type ListKeyRingsCallback = (error: (Error|null), response?: google.cloud.kms.v1.ListKeyRingsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listCryptoKeys}.
+ * @param error Error, if any
+ * @param [response] ListCryptoKeysResponse
+ */
+ type ListCryptoKeysCallback = (error: (Error|null), response?: google.cloud.kms.v1.ListCryptoKeysResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listCryptoKeyVersions}.
+ * @param error Error, if any
+ * @param [response] ListCryptoKeyVersionsResponse
+ */
+ type ListCryptoKeyVersionsCallback = (error: (Error|null), response?: google.cloud.kms.v1.ListCryptoKeyVersionsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listImportJobs}.
+ * @param error Error, if any
+ * @param [response] ListImportJobsResponse
+ */
+ type ListImportJobsCallback = (error: (Error|null), response?: google.cloud.kms.v1.ListImportJobsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getKeyRing}.
+ * @param error Error, if any
+ * @param [response] KeyRing
+ */
+ type GetKeyRingCallback = (error: (Error|null), response?: google.cloud.kms.v1.KeyRing) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getCryptoKey}.
+ * @param error Error, if any
+ * @param [response] CryptoKey
+ */
+ type GetCryptoKeyCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKey) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type GetCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getPublicKey}.
+ * @param error Error, if any
+ * @param [response] PublicKey
+ */
+ type GetPublicKeyCallback = (error: (Error|null), response?: google.cloud.kms.v1.PublicKey) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getImportJob}.
+ * @param error Error, if any
+ * @param [response] ImportJob
+ */
+ type GetImportJobCallback = (error: (Error|null), response?: google.cloud.kms.v1.ImportJob) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createKeyRing}.
+ * @param error Error, if any
+ * @param [response] KeyRing
+ */
+ type CreateKeyRingCallback = (error: (Error|null), response?: google.cloud.kms.v1.KeyRing) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createCryptoKey}.
+ * @param error Error, if any
+ * @param [response] CryptoKey
+ */
+ type CreateCryptoKeyCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKey) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type CreateCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|importCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type ImportCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createImportJob}.
+ * @param error Error, if any
+ * @param [response] ImportJob
+ */
+ type CreateImportJobCallback = (error: (Error|null), response?: google.cloud.kms.v1.ImportJob) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKey}.
+ * @param error Error, if any
+ * @param [response] CryptoKey
+ */
+ type UpdateCryptoKeyCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKey) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type UpdateCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKeyPrimaryVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKey
+ */
+ type UpdateCryptoKeyPrimaryVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKey) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|destroyCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type DestroyCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|restoreCryptoKeyVersion}.
+ * @param error Error, if any
+ * @param [response] CryptoKeyVersion
+ */
+ type RestoreCryptoKeyVersionCallback = (error: (Error|null), response?: google.cloud.kms.v1.CryptoKeyVersion) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|encrypt}.
+ * @param error Error, if any
+ * @param [response] EncryptResponse
+ */
+ type EncryptCallback = (error: (Error|null), response?: google.cloud.kms.v1.EncryptResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|decrypt}.
+ * @param error Error, if any
+ * @param [response] DecryptResponse
+ */
+ type DecryptCallback = (error: (Error|null), response?: google.cloud.kms.v1.DecryptResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|asymmetricSign}.
+ * @param error Error, if any
+ * @param [response] AsymmetricSignResponse
+ */
+ type AsymmetricSignCallback = (error: (Error|null), response?: google.cloud.kms.v1.AsymmetricSignResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|asymmetricDecrypt}.
+ * @param error Error, if any
+ * @param [response] AsymmetricDecryptResponse
+ */
+ type AsymmetricDecryptCallback = (error: (Error|null), response?: google.cloud.kms.v1.AsymmetricDecryptResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|macSign}.
+ * @param error Error, if any
+ * @param [response] MacSignResponse
+ */
+ type MacSignCallback = (error: (Error|null), response?: google.cloud.kms.v1.MacSignResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|macVerify}.
+ * @param error Error, if any
+ * @param [response] MacVerifyResponse
+ */
+ type MacVerifyCallback = (error: (Error|null), response?: google.cloud.kms.v1.MacVerifyResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|generateRandomBytes}.
+ * @param error Error, if any
+ * @param [response] GenerateRandomBytesResponse
+ */
+ type GenerateRandomBytesCallback = (error: (Error|null), response?: google.cloud.kms.v1.GenerateRandomBytesResponse) => void;
+ }
+
+ /** Properties of a ListKeyRingsRequest. */
+ interface IListKeyRingsRequest {
+
+ /** ListKeyRingsRequest parent */
+ parent?: (string|null);
+
+ /** ListKeyRingsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListKeyRingsRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListKeyRingsRequest filter */
+ filter?: (string|null);
+
+ /** ListKeyRingsRequest orderBy */
+ orderBy?: (string|null);
+ }
+
+ /** Represents a ListKeyRingsRequest. */
+ class ListKeyRingsRequest implements IListKeyRingsRequest {
+
+ /**
+ * Constructs a new ListKeyRingsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListKeyRingsRequest);
+
+ /** ListKeyRingsRequest parent. */
+ public parent: string;
+
+ /** ListKeyRingsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListKeyRingsRequest pageToken. */
+ public pageToken: string;
+
+ /** ListKeyRingsRequest filter. */
+ public filter: string;
+
+ /** ListKeyRingsRequest orderBy. */
+ public orderBy: string;
+
+ /**
+ * Creates a new ListKeyRingsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListKeyRingsRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListKeyRingsRequest): google.cloud.kms.v1.ListKeyRingsRequest;
+
+ /**
+ * Encodes the specified ListKeyRingsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsRequest.verify|verify} messages.
+ * @param message ListKeyRingsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListKeyRingsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListKeyRingsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsRequest.verify|verify} messages.
+ * @param message ListKeyRingsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListKeyRingsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListKeyRingsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListKeyRingsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListKeyRingsRequest;
+
+ /**
+ * Decodes a ListKeyRingsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListKeyRingsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListKeyRingsRequest;
+
+ /**
+ * Verifies a ListKeyRingsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListKeyRingsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListKeyRingsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListKeyRingsRequest;
+
+ /**
+ * Creates a plain object from a ListKeyRingsRequest message. Also converts values to other types if specified.
+ * @param message ListKeyRingsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListKeyRingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListKeyRingsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListKeyRingsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListCryptoKeysRequest. */
+ interface IListCryptoKeysRequest {
+
+ /** ListCryptoKeysRequest parent */
+ parent?: (string|null);
+
+ /** ListCryptoKeysRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListCryptoKeysRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListCryptoKeysRequest versionView */
+ versionView?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|null);
+
+ /** ListCryptoKeysRequest filter */
+ filter?: (string|null);
+
+ /** ListCryptoKeysRequest orderBy */
+ orderBy?: (string|null);
+ }
+
+ /** Represents a ListCryptoKeysRequest. */
+ class ListCryptoKeysRequest implements IListCryptoKeysRequest {
+
+ /**
+ * Constructs a new ListCryptoKeysRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListCryptoKeysRequest);
+
+ /** ListCryptoKeysRequest parent. */
+ public parent: string;
+
+ /** ListCryptoKeysRequest pageSize. */
+ public pageSize: number;
+
+ /** ListCryptoKeysRequest pageToken. */
+ public pageToken: string;
+
+ /** ListCryptoKeysRequest versionView. */
+ public versionView: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView);
+
+ /** ListCryptoKeysRequest filter. */
+ public filter: string;
+
+ /** ListCryptoKeysRequest orderBy. */
+ public orderBy: string;
+
+ /**
+ * Creates a new ListCryptoKeysRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListCryptoKeysRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListCryptoKeysRequest): google.cloud.kms.v1.ListCryptoKeysRequest;
+
+ /**
+ * Encodes the specified ListCryptoKeysRequest message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysRequest.verify|verify} messages.
+ * @param message ListCryptoKeysRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListCryptoKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListCryptoKeysRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysRequest.verify|verify} messages.
+ * @param message ListCryptoKeysRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListCryptoKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListCryptoKeysRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListCryptoKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListCryptoKeysRequest;
+
+ /**
+ * Decodes a ListCryptoKeysRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListCryptoKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListCryptoKeysRequest;
+
+ /**
+ * Verifies a ListCryptoKeysRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListCryptoKeysRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListCryptoKeysRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListCryptoKeysRequest;
+
+ /**
+ * Creates a plain object from a ListCryptoKeysRequest message. Also converts values to other types if specified.
+ * @param message ListCryptoKeysRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListCryptoKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListCryptoKeysRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListCryptoKeysRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListCryptoKeyVersionsRequest. */
+ interface IListCryptoKeyVersionsRequest {
+
+ /** ListCryptoKeyVersionsRequest parent */
+ parent?: (string|null);
+
+ /** ListCryptoKeyVersionsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListCryptoKeyVersionsRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListCryptoKeyVersionsRequest view */
+ view?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|null);
+
+ /** ListCryptoKeyVersionsRequest filter */
+ filter?: (string|null);
+
+ /** ListCryptoKeyVersionsRequest orderBy */
+ orderBy?: (string|null);
+ }
+
+ /** Represents a ListCryptoKeyVersionsRequest. */
+ class ListCryptoKeyVersionsRequest implements IListCryptoKeyVersionsRequest {
+
+ /**
+ * Constructs a new ListCryptoKeyVersionsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListCryptoKeyVersionsRequest);
+
+ /** ListCryptoKeyVersionsRequest parent. */
+ public parent: string;
+
+ /** ListCryptoKeyVersionsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListCryptoKeyVersionsRequest pageToken. */
+ public pageToken: string;
+
+ /** ListCryptoKeyVersionsRequest view. */
+ public view: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView);
+
+ /** ListCryptoKeyVersionsRequest filter. */
+ public filter: string;
+
+ /** ListCryptoKeyVersionsRequest orderBy. */
+ public orderBy: string;
+
+ /**
+ * Creates a new ListCryptoKeyVersionsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListCryptoKeyVersionsRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListCryptoKeyVersionsRequest): google.cloud.kms.v1.ListCryptoKeyVersionsRequest;
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsRequest.verify|verify} messages.
+ * @param message ListCryptoKeyVersionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListCryptoKeyVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsRequest.verify|verify} messages.
+ * @param message ListCryptoKeyVersionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListCryptoKeyVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListCryptoKeyVersionsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListCryptoKeyVersionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListCryptoKeyVersionsRequest;
+
+ /**
+ * Decodes a ListCryptoKeyVersionsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListCryptoKeyVersionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListCryptoKeyVersionsRequest;
+
+ /**
+ * Verifies a ListCryptoKeyVersionsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListCryptoKeyVersionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListCryptoKeyVersionsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListCryptoKeyVersionsRequest;
+
+ /**
+ * Creates a plain object from a ListCryptoKeyVersionsRequest message. Also converts values to other types if specified.
+ * @param message ListCryptoKeyVersionsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListCryptoKeyVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListCryptoKeyVersionsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListCryptoKeyVersionsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListImportJobsRequest. */
+ interface IListImportJobsRequest {
+
+ /** ListImportJobsRequest parent */
+ parent?: (string|null);
+
+ /** ListImportJobsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListImportJobsRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListImportJobsRequest filter */
+ filter?: (string|null);
+
+ /** ListImportJobsRequest orderBy */
+ orderBy?: (string|null);
+ }
+
+ /** Represents a ListImportJobsRequest. */
+ class ListImportJobsRequest implements IListImportJobsRequest {
+
+ /**
+ * Constructs a new ListImportJobsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListImportJobsRequest);
+
+ /** ListImportJobsRequest parent. */
+ public parent: string;
+
+ /** ListImportJobsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListImportJobsRequest pageToken. */
+ public pageToken: string;
+
+ /** ListImportJobsRequest filter. */
+ public filter: string;
+
+ /** ListImportJobsRequest orderBy. */
+ public orderBy: string;
+
+ /**
+ * Creates a new ListImportJobsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListImportJobsRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListImportJobsRequest): google.cloud.kms.v1.ListImportJobsRequest;
+
+ /**
+ * Encodes the specified ListImportJobsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsRequest.verify|verify} messages.
+ * @param message ListImportJobsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListImportJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListImportJobsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsRequest.verify|verify} messages.
+ * @param message ListImportJobsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListImportJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListImportJobsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListImportJobsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListImportJobsRequest;
+
+ /**
+ * Decodes a ListImportJobsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListImportJobsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListImportJobsRequest;
+
+ /**
+ * Verifies a ListImportJobsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListImportJobsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListImportJobsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListImportJobsRequest;
+
+ /**
+ * Creates a plain object from a ListImportJobsRequest message. Also converts values to other types if specified.
+ * @param message ListImportJobsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListImportJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListImportJobsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListImportJobsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListKeyRingsResponse. */
+ interface IListKeyRingsResponse {
+
+ /** ListKeyRingsResponse keyRings */
+ keyRings?: (google.cloud.kms.v1.IKeyRing[]|null);
+
+ /** ListKeyRingsResponse nextPageToken */
+ nextPageToken?: (string|null);
+
+ /** ListKeyRingsResponse totalSize */
+ totalSize?: (number|null);
+ }
+
+ /** Represents a ListKeyRingsResponse. */
+ class ListKeyRingsResponse implements IListKeyRingsResponse {
+
+ /**
+ * Constructs a new ListKeyRingsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListKeyRingsResponse);
+
+ /** ListKeyRingsResponse keyRings. */
+ public keyRings: google.cloud.kms.v1.IKeyRing[];
+
+ /** ListKeyRingsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /** ListKeyRingsResponse totalSize. */
+ public totalSize: number;
+
+ /**
+ * Creates a new ListKeyRingsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListKeyRingsResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListKeyRingsResponse): google.cloud.kms.v1.ListKeyRingsResponse;
+
+ /**
+ * Encodes the specified ListKeyRingsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsResponse.verify|verify} messages.
+ * @param message ListKeyRingsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListKeyRingsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListKeyRingsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsResponse.verify|verify} messages.
+ * @param message ListKeyRingsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListKeyRingsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListKeyRingsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListKeyRingsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListKeyRingsResponse;
+
+ /**
+ * Decodes a ListKeyRingsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListKeyRingsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListKeyRingsResponse;
+
+ /**
+ * Verifies a ListKeyRingsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListKeyRingsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListKeyRingsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListKeyRingsResponse;
+
+ /**
+ * Creates a plain object from a ListKeyRingsResponse message. Also converts values to other types if specified.
+ * @param message ListKeyRingsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListKeyRingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListKeyRingsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListKeyRingsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListCryptoKeysResponse. */
+ interface IListCryptoKeysResponse {
+
+ /** ListCryptoKeysResponse cryptoKeys */
+ cryptoKeys?: (google.cloud.kms.v1.ICryptoKey[]|null);
+
+ /** ListCryptoKeysResponse nextPageToken */
+ nextPageToken?: (string|null);
+
+ /** ListCryptoKeysResponse totalSize */
+ totalSize?: (number|null);
+ }
+
+ /** Represents a ListCryptoKeysResponse. */
+ class ListCryptoKeysResponse implements IListCryptoKeysResponse {
+
+ /**
+ * Constructs a new ListCryptoKeysResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListCryptoKeysResponse);
+
+ /** ListCryptoKeysResponse cryptoKeys. */
+ public cryptoKeys: google.cloud.kms.v1.ICryptoKey[];
+
+ /** ListCryptoKeysResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /** ListCryptoKeysResponse totalSize. */
+ public totalSize: number;
+
+ /**
+ * Creates a new ListCryptoKeysResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListCryptoKeysResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListCryptoKeysResponse): google.cloud.kms.v1.ListCryptoKeysResponse;
+
+ /**
+ * Encodes the specified ListCryptoKeysResponse message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysResponse.verify|verify} messages.
+ * @param message ListCryptoKeysResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListCryptoKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListCryptoKeysResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysResponse.verify|verify} messages.
+ * @param message ListCryptoKeysResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListCryptoKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListCryptoKeysResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListCryptoKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListCryptoKeysResponse;
+
+ /**
+ * Decodes a ListCryptoKeysResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListCryptoKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListCryptoKeysResponse;
+
+ /**
+ * Verifies a ListCryptoKeysResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListCryptoKeysResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListCryptoKeysResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListCryptoKeysResponse;
+
+ /**
+ * Creates a plain object from a ListCryptoKeysResponse message. Also converts values to other types if specified.
+ * @param message ListCryptoKeysResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListCryptoKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListCryptoKeysResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListCryptoKeysResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListCryptoKeyVersionsResponse. */
+ interface IListCryptoKeyVersionsResponse {
+
+ /** ListCryptoKeyVersionsResponse cryptoKeyVersions */
+ cryptoKeyVersions?: (google.cloud.kms.v1.ICryptoKeyVersion[]|null);
+
+ /** ListCryptoKeyVersionsResponse nextPageToken */
+ nextPageToken?: (string|null);
+
+ /** ListCryptoKeyVersionsResponse totalSize */
+ totalSize?: (number|null);
+ }
+
+ /** Represents a ListCryptoKeyVersionsResponse. */
+ class ListCryptoKeyVersionsResponse implements IListCryptoKeyVersionsResponse {
+
+ /**
+ * Constructs a new ListCryptoKeyVersionsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListCryptoKeyVersionsResponse);
+
+ /** ListCryptoKeyVersionsResponse cryptoKeyVersions. */
+ public cryptoKeyVersions: google.cloud.kms.v1.ICryptoKeyVersion[];
+
+ /** ListCryptoKeyVersionsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /** ListCryptoKeyVersionsResponse totalSize. */
+ public totalSize: number;
+
+ /**
+ * Creates a new ListCryptoKeyVersionsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListCryptoKeyVersionsResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListCryptoKeyVersionsResponse): google.cloud.kms.v1.ListCryptoKeyVersionsResponse;
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsResponse.verify|verify} messages.
+ * @param message ListCryptoKeyVersionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListCryptoKeyVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsResponse.verify|verify} messages.
+ * @param message ListCryptoKeyVersionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListCryptoKeyVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListCryptoKeyVersionsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListCryptoKeyVersionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListCryptoKeyVersionsResponse;
+
+ /**
+ * Decodes a ListCryptoKeyVersionsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListCryptoKeyVersionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListCryptoKeyVersionsResponse;
+
+ /**
+ * Verifies a ListCryptoKeyVersionsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListCryptoKeyVersionsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListCryptoKeyVersionsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListCryptoKeyVersionsResponse;
+
+ /**
+ * Creates a plain object from a ListCryptoKeyVersionsResponse message. Also converts values to other types if specified.
+ * @param message ListCryptoKeyVersionsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListCryptoKeyVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListCryptoKeyVersionsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListCryptoKeyVersionsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListImportJobsResponse. */
+ interface IListImportJobsResponse {
+
+ /** ListImportJobsResponse importJobs */
+ importJobs?: (google.cloud.kms.v1.IImportJob[]|null);
+
+ /** ListImportJobsResponse nextPageToken */
+ nextPageToken?: (string|null);
+
+ /** ListImportJobsResponse totalSize */
+ totalSize?: (number|null);
+ }
+
+ /** Represents a ListImportJobsResponse. */
+ class ListImportJobsResponse implements IListImportJobsResponse {
+
+ /**
+ * Constructs a new ListImportJobsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IListImportJobsResponse);
+
+ /** ListImportJobsResponse importJobs. */
+ public importJobs: google.cloud.kms.v1.IImportJob[];
+
+ /** ListImportJobsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /** ListImportJobsResponse totalSize. */
+ public totalSize: number;
+
+ /**
+ * Creates a new ListImportJobsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListImportJobsResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IListImportJobsResponse): google.cloud.kms.v1.ListImportJobsResponse;
+
+ /**
+ * Encodes the specified ListImportJobsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsResponse.verify|verify} messages.
+ * @param message ListImportJobsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IListImportJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListImportJobsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsResponse.verify|verify} messages.
+ * @param message ListImportJobsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IListImportJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListImportJobsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListImportJobsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ListImportJobsResponse;
+
+ /**
+ * Decodes a ListImportJobsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListImportJobsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ListImportJobsResponse;
+
+ /**
+ * Verifies a ListImportJobsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListImportJobsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListImportJobsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ListImportJobsResponse;
+
+ /**
+ * Creates a plain object from a ListImportJobsResponse message. Also converts values to other types if specified.
+ * @param message ListImportJobsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ListImportJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListImportJobsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListImportJobsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetKeyRingRequest. */
+ interface IGetKeyRingRequest {
+
+ /** GetKeyRingRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetKeyRingRequest. */
+ class GetKeyRingRequest implements IGetKeyRingRequest {
+
+ /**
+ * Constructs a new GetKeyRingRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetKeyRingRequest);
+
+ /** GetKeyRingRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetKeyRingRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetKeyRingRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetKeyRingRequest): google.cloud.kms.v1.GetKeyRingRequest;
+
+ /**
+ * Encodes the specified GetKeyRingRequest message. Does not implicitly {@link google.cloud.kms.v1.GetKeyRingRequest.verify|verify} messages.
+ * @param message GetKeyRingRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetKeyRingRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetKeyRingRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetKeyRingRequest.verify|verify} messages.
+ * @param message GetKeyRingRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetKeyRingRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetKeyRingRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetKeyRingRequest;
+
+ /**
+ * Decodes a GetKeyRingRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetKeyRingRequest;
+
+ /**
+ * Verifies a GetKeyRingRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetKeyRingRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetKeyRingRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetKeyRingRequest;
+
+ /**
+ * Creates a plain object from a GetKeyRingRequest message. Also converts values to other types if specified.
+ * @param message GetKeyRingRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetKeyRingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetKeyRingRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetKeyRingRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetCryptoKeyRequest. */
+ interface IGetCryptoKeyRequest {
+
+ /** GetCryptoKeyRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetCryptoKeyRequest. */
+ class GetCryptoKeyRequest implements IGetCryptoKeyRequest {
+
+ /**
+ * Constructs a new GetCryptoKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetCryptoKeyRequest);
+
+ /** GetCryptoKeyRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetCryptoKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetCryptoKeyRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetCryptoKeyRequest): google.cloud.kms.v1.GetCryptoKeyRequest;
+
+ /**
+ * Encodes the specified GetCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyRequest.verify|verify} messages.
+ * @param message GetCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyRequest.verify|verify} messages.
+ * @param message GetCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetCryptoKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetCryptoKeyRequest;
+
+ /**
+ * Decodes a GetCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetCryptoKeyRequest;
+
+ /**
+ * Verifies a GetCryptoKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetCryptoKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetCryptoKeyRequest;
+
+ /**
+ * Creates a plain object from a GetCryptoKeyRequest message. Also converts values to other types if specified.
+ * @param message GetCryptoKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetCryptoKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetCryptoKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetCryptoKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetCryptoKeyVersionRequest. */
+ interface IGetCryptoKeyVersionRequest {
+
+ /** GetCryptoKeyVersionRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetCryptoKeyVersionRequest. */
+ class GetCryptoKeyVersionRequest implements IGetCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new GetCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetCryptoKeyVersionRequest);
+
+ /** GetCryptoKeyVersionRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetCryptoKeyVersionRequest): google.cloud.kms.v1.GetCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified GetCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message GetCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message GetCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetCryptoKeyVersionRequest;
+
+ /**
+ * Decodes a GetCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetCryptoKeyVersionRequest;
+
+ /**
+ * Verifies a GetCryptoKeyVersionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from a GetCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message GetCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetPublicKeyRequest. */
+ interface IGetPublicKeyRequest {
+
+ /** GetPublicKeyRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetPublicKeyRequest. */
+ class GetPublicKeyRequest implements IGetPublicKeyRequest {
+
+ /**
+ * Constructs a new GetPublicKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetPublicKeyRequest);
+
+ /** GetPublicKeyRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetPublicKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetPublicKeyRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetPublicKeyRequest): google.cloud.kms.v1.GetPublicKeyRequest;
+
+ /**
+ * Encodes the specified GetPublicKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.GetPublicKeyRequest.verify|verify} messages.
+ * @param message GetPublicKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetPublicKeyRequest.verify|verify} messages.
+ * @param message GetPublicKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetPublicKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetPublicKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetPublicKeyRequest;
+
+ /**
+ * Decodes a GetPublicKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetPublicKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetPublicKeyRequest;
+
+ /**
+ * Verifies a GetPublicKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetPublicKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetPublicKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetPublicKeyRequest;
+
+ /**
+ * Creates a plain object from a GetPublicKeyRequest message. Also converts values to other types if specified.
+ * @param message GetPublicKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetPublicKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetPublicKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetImportJobRequest. */
+ interface IGetImportJobRequest {
+
+ /** GetImportJobRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetImportJobRequest. */
+ class GetImportJobRequest implements IGetImportJobRequest {
+
+ /**
+ * Constructs a new GetImportJobRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGetImportJobRequest);
+
+ /** GetImportJobRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetImportJobRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetImportJobRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGetImportJobRequest): google.cloud.kms.v1.GetImportJobRequest;
+
+ /**
+ * Encodes the specified GetImportJobRequest message. Does not implicitly {@link google.cloud.kms.v1.GetImportJobRequest.verify|verify} messages.
+ * @param message GetImportJobRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGetImportJobRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetImportJobRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetImportJobRequest.verify|verify} messages.
+ * @param message GetImportJobRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGetImportJobRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetImportJobRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GetImportJobRequest;
+
+ /**
+ * Decodes a GetImportJobRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GetImportJobRequest;
+
+ /**
+ * Verifies a GetImportJobRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetImportJobRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetImportJobRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GetImportJobRequest;
+
+ /**
+ * Creates a plain object from a GetImportJobRequest message. Also converts values to other types if specified.
+ * @param message GetImportJobRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GetImportJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetImportJobRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetImportJobRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateKeyRingRequest. */
+ interface ICreateKeyRingRequest {
+
+ /** CreateKeyRingRequest parent */
+ parent?: (string|null);
+
+ /** CreateKeyRingRequest keyRingId */
+ keyRingId?: (string|null);
+
+ /** CreateKeyRingRequest keyRing */
+ keyRing?: (google.cloud.kms.v1.IKeyRing|null);
+ }
+
+ /** Represents a CreateKeyRingRequest. */
+ class CreateKeyRingRequest implements ICreateKeyRingRequest {
+
+ /**
+ * Constructs a new CreateKeyRingRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICreateKeyRingRequest);
+
+ /** CreateKeyRingRequest parent. */
+ public parent: string;
+
+ /** CreateKeyRingRequest keyRingId. */
+ public keyRingId: string;
+
+ /** CreateKeyRingRequest keyRing. */
+ public keyRing?: (google.cloud.kms.v1.IKeyRing|null);
+
+ /**
+ * Creates a new CreateKeyRingRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateKeyRingRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICreateKeyRingRequest): google.cloud.kms.v1.CreateKeyRingRequest;
+
+ /**
+ * Encodes the specified CreateKeyRingRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateKeyRingRequest.verify|verify} messages.
+ * @param message CreateKeyRingRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICreateKeyRingRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateKeyRingRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateKeyRingRequest.verify|verify} messages.
+ * @param message CreateKeyRingRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICreateKeyRingRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateKeyRingRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CreateKeyRingRequest;
+
+ /**
+ * Decodes a CreateKeyRingRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CreateKeyRingRequest;
+
+ /**
+ * Verifies a CreateKeyRingRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateKeyRingRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateKeyRingRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CreateKeyRingRequest;
+
+ /**
+ * Creates a plain object from a CreateKeyRingRequest message. Also converts values to other types if specified.
+ * @param message CreateKeyRingRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CreateKeyRingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateKeyRingRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateKeyRingRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateCryptoKeyRequest. */
+ interface ICreateCryptoKeyRequest {
+
+ /** CreateCryptoKeyRequest parent */
+ parent?: (string|null);
+
+ /** CreateCryptoKeyRequest cryptoKeyId */
+ cryptoKeyId?: (string|null);
+
+ /** CreateCryptoKeyRequest cryptoKey */
+ cryptoKey?: (google.cloud.kms.v1.ICryptoKey|null);
+
+ /** CreateCryptoKeyRequest skipInitialVersionCreation */
+ skipInitialVersionCreation?: (boolean|null);
+ }
+
+ /** Represents a CreateCryptoKeyRequest. */
+ class CreateCryptoKeyRequest implements ICreateCryptoKeyRequest {
+
+ /**
+ * Constructs a new CreateCryptoKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICreateCryptoKeyRequest);
+
+ /** CreateCryptoKeyRequest parent. */
+ public parent: string;
+
+ /** CreateCryptoKeyRequest cryptoKeyId. */
+ public cryptoKeyId: string;
+
+ /** CreateCryptoKeyRequest cryptoKey. */
+ public cryptoKey?: (google.cloud.kms.v1.ICryptoKey|null);
+
+ /** CreateCryptoKeyRequest skipInitialVersionCreation. */
+ public skipInitialVersionCreation: boolean;
+
+ /**
+ * Creates a new CreateCryptoKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateCryptoKeyRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICreateCryptoKeyRequest): google.cloud.kms.v1.CreateCryptoKeyRequest;
+
+ /**
+ * Encodes the specified CreateCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyRequest.verify|verify} messages.
+ * @param message CreateCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICreateCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyRequest.verify|verify} messages.
+ * @param message CreateCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICreateCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateCryptoKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CreateCryptoKeyRequest;
+
+ /**
+ * Decodes a CreateCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CreateCryptoKeyRequest;
+
+ /**
+ * Verifies a CreateCryptoKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateCryptoKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CreateCryptoKeyRequest;
+
+ /**
+ * Creates a plain object from a CreateCryptoKeyRequest message. Also converts values to other types if specified.
+ * @param message CreateCryptoKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CreateCryptoKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateCryptoKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateCryptoKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateCryptoKeyVersionRequest. */
+ interface ICreateCryptoKeyVersionRequest {
+
+ /** CreateCryptoKeyVersionRequest parent */
+ parent?: (string|null);
+
+ /** CreateCryptoKeyVersionRequest cryptoKeyVersion */
+ cryptoKeyVersion?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+ }
+
+ /** Represents a CreateCryptoKeyVersionRequest. */
+ class CreateCryptoKeyVersionRequest implements ICreateCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new CreateCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest);
+
+ /** CreateCryptoKeyVersionRequest parent. */
+ public parent: string;
+
+ /** CreateCryptoKeyVersionRequest cryptoKeyVersion. */
+ public cryptoKeyVersion?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+
+ /**
+ * Creates a new CreateCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest): google.cloud.kms.v1.CreateCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified CreateCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message CreateCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message CreateCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICreateCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CreateCryptoKeyVersionRequest;
+
+ /**
+ * Decodes a CreateCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CreateCryptoKeyVersionRequest;
+
+ /**
+ * Verifies a CreateCryptoKeyVersionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CreateCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from a CreateCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message CreateCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CreateCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportCryptoKeyVersionRequest. */
+ interface IImportCryptoKeyVersionRequest {
+
+ /** ImportCryptoKeyVersionRequest parent */
+ parent?: (string|null);
+
+ /** ImportCryptoKeyVersionRequest cryptoKeyVersion */
+ cryptoKeyVersion?: (string|null);
+
+ /** ImportCryptoKeyVersionRequest algorithm */
+ algorithm?: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null);
+
+ /** ImportCryptoKeyVersionRequest importJob */
+ importJob?: (string|null);
+
+ /** ImportCryptoKeyVersionRequest rsaAesWrappedKey */
+ rsaAesWrappedKey?: (Uint8Array|string|null);
+ }
+
+ /** Represents an ImportCryptoKeyVersionRequest. */
+ class ImportCryptoKeyVersionRequest implements IImportCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new ImportCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IImportCryptoKeyVersionRequest);
+
+ /** ImportCryptoKeyVersionRequest parent. */
+ public parent: string;
+
+ /** ImportCryptoKeyVersionRequest cryptoKeyVersion. */
+ public cryptoKeyVersion: string;
+
+ /** ImportCryptoKeyVersionRequest algorithm. */
+ public algorithm: (google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|keyof typeof google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm);
+
+ /** ImportCryptoKeyVersionRequest importJob. */
+ public importJob: string;
+
+ /** ImportCryptoKeyVersionRequest rsaAesWrappedKey. */
+ public rsaAesWrappedKey?: (Uint8Array|string|null);
+
+ /** ImportCryptoKeyVersionRequest wrappedKeyMaterial. */
+ public wrappedKeyMaterial?: "rsaAesWrappedKey";
+
+ /**
+ * Creates a new ImportCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IImportCryptoKeyVersionRequest): google.cloud.kms.v1.ImportCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified ImportCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.ImportCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message ImportCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IImportCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message ImportCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IImportCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.ImportCryptoKeyVersionRequest;
+
+ /**
+ * Decodes an ImportCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.ImportCryptoKeyVersionRequest;
+
+ /**
+ * Verifies an ImportCryptoKeyVersionRequest message.
+ * @param message Plain 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 ImportCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.ImportCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from an ImportCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message ImportCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.ImportCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateImportJobRequest. */
+ interface ICreateImportJobRequest {
+
+ /** CreateImportJobRequest parent */
+ parent?: (string|null);
+
+ /** CreateImportJobRequest importJobId */
+ importJobId?: (string|null);
+
+ /** CreateImportJobRequest importJob */
+ importJob?: (google.cloud.kms.v1.IImportJob|null);
+ }
+
+ /** Represents a CreateImportJobRequest. */
+ class CreateImportJobRequest implements ICreateImportJobRequest {
+
+ /**
+ * Constructs a new CreateImportJobRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ICreateImportJobRequest);
+
+ /** CreateImportJobRequest parent. */
+ public parent: string;
+
+ /** CreateImportJobRequest importJobId. */
+ public importJobId: string;
+
+ /** CreateImportJobRequest importJob. */
+ public importJob?: (google.cloud.kms.v1.IImportJob|null);
+
+ /**
+ * Creates a new CreateImportJobRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateImportJobRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ICreateImportJobRequest): google.cloud.kms.v1.CreateImportJobRequest;
+
+ /**
+ * Encodes the specified CreateImportJobRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateImportJobRequest.verify|verify} messages.
+ * @param message CreateImportJobRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ICreateImportJobRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateImportJobRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateImportJobRequest.verify|verify} messages.
+ * @param message CreateImportJobRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ICreateImportJobRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateImportJobRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.CreateImportJobRequest;
+
+ /**
+ * Decodes a CreateImportJobRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.CreateImportJobRequest;
+
+ /**
+ * Verifies a CreateImportJobRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateImportJobRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateImportJobRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.CreateImportJobRequest;
+
+ /**
+ * Creates a plain object from a CreateImportJobRequest message. Also converts values to other types if specified.
+ * @param message CreateImportJobRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.CreateImportJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateImportJobRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateImportJobRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateCryptoKeyRequest. */
+ interface IUpdateCryptoKeyRequest {
+
+ /** UpdateCryptoKeyRequest cryptoKey */
+ cryptoKey?: (google.cloud.kms.v1.ICryptoKey|null);
+
+ /** UpdateCryptoKeyRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateCryptoKeyRequest. */
+ class UpdateCryptoKeyRequest implements IUpdateCryptoKeyRequest {
+
+ /**
+ * Constructs a new UpdateCryptoKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IUpdateCryptoKeyRequest);
+
+ /** UpdateCryptoKeyRequest cryptoKey. */
+ public cryptoKey?: (google.cloud.kms.v1.ICryptoKey|null);
+
+ /** UpdateCryptoKeyRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateCryptoKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateCryptoKeyRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IUpdateCryptoKeyRequest): google.cloud.kms.v1.UpdateCryptoKeyRequest;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IUpdateCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IUpdateCryptoKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateCryptoKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.UpdateCryptoKeyRequest;
+
+ /**
+ * Decodes an UpdateCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.UpdateCryptoKeyRequest;
+
+ /**
+ * Verifies an UpdateCryptoKeyRequest message.
+ * @param message Plain 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 UpdateCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateCryptoKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.UpdateCryptoKeyRequest;
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyRequest message. Also converts values to other types if specified.
+ * @param message UpdateCryptoKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.UpdateCryptoKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateCryptoKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateCryptoKeyVersionRequest. */
+ interface IUpdateCryptoKeyVersionRequest {
+
+ /** UpdateCryptoKeyVersionRequest cryptoKeyVersion */
+ cryptoKeyVersion?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+
+ /** UpdateCryptoKeyVersionRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateCryptoKeyVersionRequest. */
+ class UpdateCryptoKeyVersionRequest implements IUpdateCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new UpdateCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest);
+
+ /** UpdateCryptoKeyVersionRequest cryptoKeyVersion. */
+ public cryptoKeyVersion?: (google.cloud.kms.v1.ICryptoKeyVersion|null);
+
+ /** UpdateCryptoKeyVersionRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest): google.cloud.kms.v1.UpdateCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.UpdateCryptoKeyVersionRequest;
+
+ /**
+ * Decodes an UpdateCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.UpdateCryptoKeyVersionRequest;
+
+ /**
+ * Verifies an UpdateCryptoKeyVersionRequest message.
+ * @param message Plain 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 UpdateCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.UpdateCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message UpdateCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.UpdateCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateCryptoKeyPrimaryVersionRequest. */
+ interface IUpdateCryptoKeyPrimaryVersionRequest {
+
+ /** UpdateCryptoKeyPrimaryVersionRequest name */
+ name?: (string|null);
+
+ /** UpdateCryptoKeyPrimaryVersionRequest cryptoKeyVersionId */
+ cryptoKeyVersionId?: (string|null);
+ }
+
+ /** Represents an UpdateCryptoKeyPrimaryVersionRequest. */
+ class UpdateCryptoKeyPrimaryVersionRequest implements IUpdateCryptoKeyPrimaryVersionRequest {
+
+ /**
+ * Constructs a new UpdateCryptoKeyPrimaryVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest);
+
+ /** UpdateCryptoKeyPrimaryVersionRequest name. */
+ public name: string;
+
+ /** UpdateCryptoKeyPrimaryVersionRequest cryptoKeyVersionId. */
+ public cryptoKeyVersionId: string;
+
+ /**
+ * Creates a new UpdateCryptoKeyPrimaryVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateCryptoKeyPrimaryVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest): google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyPrimaryVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyPrimaryVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateCryptoKeyPrimaryVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest.verify|verify} messages.
+ * @param message UpdateCryptoKeyPrimaryVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateCryptoKeyPrimaryVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateCryptoKeyPrimaryVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest;
+
+ /**
+ * Decodes an UpdateCryptoKeyPrimaryVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateCryptoKeyPrimaryVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest;
+
+ /**
+ * Verifies an UpdateCryptoKeyPrimaryVersionRequest message.
+ * @param message Plain 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 UpdateCryptoKeyPrimaryVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateCryptoKeyPrimaryVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest;
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyPrimaryVersionRequest message. Also converts values to other types if specified.
+ * @param message UpdateCryptoKeyPrimaryVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateCryptoKeyPrimaryVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyPrimaryVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DestroyCryptoKeyVersionRequest. */
+ interface IDestroyCryptoKeyVersionRequest {
+
+ /** DestroyCryptoKeyVersionRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a DestroyCryptoKeyVersionRequest. */
+ class DestroyCryptoKeyVersionRequest implements IDestroyCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new DestroyCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest);
+
+ /** DestroyCryptoKeyVersionRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new DestroyCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DestroyCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest): google.cloud.kms.v1.DestroyCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified DestroyCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.DestroyCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message DestroyCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DestroyCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.DestroyCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message DestroyCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DestroyCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DestroyCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.DestroyCryptoKeyVersionRequest;
+
+ /**
+ * Decodes a DestroyCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DestroyCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.DestroyCryptoKeyVersionRequest;
+
+ /**
+ * Verifies a DestroyCryptoKeyVersionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DestroyCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DestroyCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.DestroyCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from a DestroyCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message DestroyCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.DestroyCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DestroyCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DestroyCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RestoreCryptoKeyVersionRequest. */
+ interface IRestoreCryptoKeyVersionRequest {
+
+ /** RestoreCryptoKeyVersionRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a RestoreCryptoKeyVersionRequest. */
+ class RestoreCryptoKeyVersionRequest implements IRestoreCryptoKeyVersionRequest {
+
+ /**
+ * Constructs a new RestoreCryptoKeyVersionRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest);
+
+ /** RestoreCryptoKeyVersionRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new RestoreCryptoKeyVersionRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RestoreCryptoKeyVersionRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest): google.cloud.kms.v1.RestoreCryptoKeyVersionRequest;
+
+ /**
+ * Encodes the specified RestoreCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.RestoreCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message RestoreCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RestoreCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.RestoreCryptoKeyVersionRequest.verify|verify} messages.
+ * @param message RestoreCryptoKeyVersionRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RestoreCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RestoreCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.RestoreCryptoKeyVersionRequest;
+
+ /**
+ * Decodes a RestoreCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RestoreCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.RestoreCryptoKeyVersionRequest;
+
+ /**
+ * Verifies a RestoreCryptoKeyVersionRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RestoreCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RestoreCryptoKeyVersionRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.RestoreCryptoKeyVersionRequest;
+
+ /**
+ * Creates a plain object from a RestoreCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @param message RestoreCryptoKeyVersionRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.RestoreCryptoKeyVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RestoreCryptoKeyVersionRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RestoreCryptoKeyVersionRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EncryptRequest. */
+ interface IEncryptRequest {
+
+ /** EncryptRequest name */
+ name?: (string|null);
+
+ /** EncryptRequest plaintext */
+ plaintext?: (Uint8Array|string|null);
+
+ /** EncryptRequest additionalAuthenticatedData */
+ additionalAuthenticatedData?: (Uint8Array|string|null);
+
+ /** EncryptRequest plaintextCrc32c */
+ plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** EncryptRequest additionalAuthenticatedDataCrc32c */
+ additionalAuthenticatedDataCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents an EncryptRequest. */
+ class EncryptRequest implements IEncryptRequest {
+
+ /**
+ * Constructs a new EncryptRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IEncryptRequest);
+
+ /** EncryptRequest name. */
+ public name: string;
+
+ /** EncryptRequest plaintext. */
+ public plaintext: (Uint8Array|string);
+
+ /** EncryptRequest additionalAuthenticatedData. */
+ public additionalAuthenticatedData: (Uint8Array|string);
+
+ /** EncryptRequest plaintextCrc32c. */
+ public plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** EncryptRequest additionalAuthenticatedDataCrc32c. */
+ public additionalAuthenticatedDataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new EncryptRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EncryptRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IEncryptRequest): google.cloud.kms.v1.EncryptRequest;
+
+ /**
+ * Encodes the specified EncryptRequest message. Does not implicitly {@link google.cloud.kms.v1.EncryptRequest.verify|verify} messages.
+ * @param message EncryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IEncryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EncryptRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EncryptRequest.verify|verify} messages.
+ * @param message EncryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IEncryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EncryptRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EncryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.EncryptRequest;
+
+ /**
+ * Decodes an EncryptRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EncryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.EncryptRequest;
+
+ /**
+ * Verifies an EncryptRequest message.
+ * @param message Plain 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 EncryptRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EncryptRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.EncryptRequest;
+
+ /**
+ * Creates a plain object from an EncryptRequest message. Also converts values to other types if specified.
+ * @param message EncryptRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.EncryptRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EncryptRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EncryptRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DecryptRequest. */
+ interface IDecryptRequest {
+
+ /** DecryptRequest name */
+ name?: (string|null);
+
+ /** DecryptRequest ciphertext */
+ ciphertext?: (Uint8Array|string|null);
+
+ /** DecryptRequest additionalAuthenticatedData */
+ additionalAuthenticatedData?: (Uint8Array|string|null);
+
+ /** DecryptRequest ciphertextCrc32c */
+ ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** DecryptRequest additionalAuthenticatedDataCrc32c */
+ additionalAuthenticatedDataCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents a DecryptRequest. */
+ class DecryptRequest implements IDecryptRequest {
+
+ /**
+ * Constructs a new DecryptRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IDecryptRequest);
+
+ /** DecryptRequest name. */
+ public name: string;
+
+ /** DecryptRequest ciphertext. */
+ public ciphertext: (Uint8Array|string);
+
+ /** DecryptRequest additionalAuthenticatedData. */
+ public additionalAuthenticatedData: (Uint8Array|string);
+
+ /** DecryptRequest ciphertextCrc32c. */
+ public ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** DecryptRequest additionalAuthenticatedDataCrc32c. */
+ public additionalAuthenticatedDataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new DecryptRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DecryptRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IDecryptRequest): google.cloud.kms.v1.DecryptRequest;
+
+ /**
+ * Encodes the specified DecryptRequest message. Does not implicitly {@link google.cloud.kms.v1.DecryptRequest.verify|verify} messages.
+ * @param message DecryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IDecryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DecryptRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.DecryptRequest.verify|verify} messages.
+ * @param message DecryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IDecryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DecryptRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.DecryptRequest;
+
+ /**
+ * Decodes a DecryptRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.DecryptRequest;
+
+ /**
+ * Verifies a DecryptRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DecryptRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DecryptRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.DecryptRequest;
+
+ /**
+ * Creates a plain object from a DecryptRequest message. Also converts values to other types if specified.
+ * @param message DecryptRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.DecryptRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DecryptRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DecryptRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AsymmetricSignRequest. */
+ interface IAsymmetricSignRequest {
+
+ /** AsymmetricSignRequest name */
+ name?: (string|null);
+
+ /** AsymmetricSignRequest digest */
+ digest?: (google.cloud.kms.v1.IDigest|null);
+
+ /** AsymmetricSignRequest digestCrc32c */
+ digestCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricSignRequest data */
+ data?: (Uint8Array|string|null);
+
+ /** AsymmetricSignRequest dataCrc32c */
+ dataCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents an AsymmetricSignRequest. */
+ class AsymmetricSignRequest implements IAsymmetricSignRequest {
+
+ /**
+ * Constructs a new AsymmetricSignRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IAsymmetricSignRequest);
+
+ /** AsymmetricSignRequest name. */
+ public name: string;
+
+ /** AsymmetricSignRequest digest. */
+ public digest?: (google.cloud.kms.v1.IDigest|null);
+
+ /** AsymmetricSignRequest digestCrc32c. */
+ public digestCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricSignRequest data. */
+ public data: (Uint8Array|string);
+
+ /** AsymmetricSignRequest dataCrc32c. */
+ public dataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new AsymmetricSignRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AsymmetricSignRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IAsymmetricSignRequest): google.cloud.kms.v1.AsymmetricSignRequest;
+
+ /**
+ * Encodes the specified AsymmetricSignRequest message. Does not implicitly {@link google.cloud.kms.v1.AsymmetricSignRequest.verify|verify} messages.
+ * @param message AsymmetricSignRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IAsymmetricSignRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AsymmetricSignRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.AsymmetricSignRequest.verify|verify} messages.
+ * @param message AsymmetricSignRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IAsymmetricSignRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AsymmetricSignRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AsymmetricSignRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.AsymmetricSignRequest;
+
+ /**
+ * Decodes an AsymmetricSignRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AsymmetricSignRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.AsymmetricSignRequest;
+
+ /**
+ * Verifies an AsymmetricSignRequest message.
+ * @param message Plain 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 AsymmetricSignRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AsymmetricSignRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.AsymmetricSignRequest;
+
+ /**
+ * Creates a plain object from an AsymmetricSignRequest message. Also converts values to other types if specified.
+ * @param message AsymmetricSignRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.AsymmetricSignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AsymmetricSignRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AsymmetricSignRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AsymmetricDecryptRequest. */
+ interface IAsymmetricDecryptRequest {
+
+ /** AsymmetricDecryptRequest name */
+ name?: (string|null);
+
+ /** AsymmetricDecryptRequest ciphertext */
+ ciphertext?: (Uint8Array|string|null);
+
+ /** AsymmetricDecryptRequest ciphertextCrc32c */
+ ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents an AsymmetricDecryptRequest. */
+ class AsymmetricDecryptRequest implements IAsymmetricDecryptRequest {
+
+ /**
+ * Constructs a new AsymmetricDecryptRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IAsymmetricDecryptRequest);
+
+ /** AsymmetricDecryptRequest name. */
+ public name: string;
+
+ /** AsymmetricDecryptRequest ciphertext. */
+ public ciphertext: (Uint8Array|string);
+
+ /** AsymmetricDecryptRequest ciphertextCrc32c. */
+ public ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new AsymmetricDecryptRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AsymmetricDecryptRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IAsymmetricDecryptRequest): google.cloud.kms.v1.AsymmetricDecryptRequest;
+
+ /**
+ * Encodes the specified AsymmetricDecryptRequest message. Does not implicitly {@link google.cloud.kms.v1.AsymmetricDecryptRequest.verify|verify} messages.
+ * @param message AsymmetricDecryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IAsymmetricDecryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AsymmetricDecryptRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.AsymmetricDecryptRequest.verify|verify} messages.
+ * @param message AsymmetricDecryptRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IAsymmetricDecryptRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AsymmetricDecryptRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AsymmetricDecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.AsymmetricDecryptRequest;
+
+ /**
+ * Decodes an AsymmetricDecryptRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AsymmetricDecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.AsymmetricDecryptRequest;
+
+ /**
+ * Verifies an AsymmetricDecryptRequest message.
+ * @param message Plain 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 AsymmetricDecryptRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AsymmetricDecryptRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.AsymmetricDecryptRequest;
+
+ /**
+ * Creates a plain object from an AsymmetricDecryptRequest message. Also converts values to other types if specified.
+ * @param message AsymmetricDecryptRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.AsymmetricDecryptRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AsymmetricDecryptRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AsymmetricDecryptRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MacSignRequest. */
+ interface IMacSignRequest {
+
+ /** MacSignRequest name */
+ name?: (string|null);
+
+ /** MacSignRequest data */
+ data?: (Uint8Array|string|null);
+
+ /** MacSignRequest dataCrc32c */
+ dataCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents a MacSignRequest. */
+ class MacSignRequest implements IMacSignRequest {
+
+ /**
+ * Constructs a new MacSignRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IMacSignRequest);
+
+ /** MacSignRequest name. */
+ public name: string;
+
+ /** MacSignRequest data. */
+ public data: (Uint8Array|string);
+
+ /** MacSignRequest dataCrc32c. */
+ public dataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new MacSignRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MacSignRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IMacSignRequest): google.cloud.kms.v1.MacSignRequest;
+
+ /**
+ * Encodes the specified MacSignRequest message. Does not implicitly {@link google.cloud.kms.v1.MacSignRequest.verify|verify} messages.
+ * @param message MacSignRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IMacSignRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MacSignRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.MacSignRequest.verify|verify} messages.
+ * @param message MacSignRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IMacSignRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MacSignRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MacSignRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.MacSignRequest;
+
+ /**
+ * Decodes a MacSignRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MacSignRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.MacSignRequest;
+
+ /**
+ * Verifies a MacSignRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MacSignRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MacSignRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.MacSignRequest;
+
+ /**
+ * Creates a plain object from a MacSignRequest message. Also converts values to other types if specified.
+ * @param message MacSignRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.MacSignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MacSignRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MacSignRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MacVerifyRequest. */
+ interface IMacVerifyRequest {
+
+ /** MacVerifyRequest name */
+ name?: (string|null);
+
+ /** MacVerifyRequest data */
+ data?: (Uint8Array|string|null);
+
+ /** MacVerifyRequest dataCrc32c */
+ dataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** MacVerifyRequest mac */
+ mac?: (Uint8Array|string|null);
+
+ /** MacVerifyRequest macCrc32c */
+ macCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents a MacVerifyRequest. */
+ class MacVerifyRequest implements IMacVerifyRequest {
+
+ /**
+ * Constructs a new MacVerifyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IMacVerifyRequest);
+
+ /** MacVerifyRequest name. */
+ public name: string;
+
+ /** MacVerifyRequest data. */
+ public data: (Uint8Array|string);
+
+ /** MacVerifyRequest dataCrc32c. */
+ public dataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** MacVerifyRequest mac. */
+ public mac: (Uint8Array|string);
+
+ /** MacVerifyRequest macCrc32c. */
+ public macCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new MacVerifyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MacVerifyRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IMacVerifyRequest): google.cloud.kms.v1.MacVerifyRequest;
+
+ /**
+ * Encodes the specified MacVerifyRequest message. Does not implicitly {@link google.cloud.kms.v1.MacVerifyRequest.verify|verify} messages.
+ * @param message MacVerifyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IMacVerifyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MacVerifyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.MacVerifyRequest.verify|verify} messages.
+ * @param message MacVerifyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IMacVerifyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MacVerifyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MacVerifyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.MacVerifyRequest;
+
+ /**
+ * Decodes a MacVerifyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MacVerifyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.MacVerifyRequest;
+
+ /**
+ * Verifies a MacVerifyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MacVerifyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MacVerifyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.MacVerifyRequest;
+
+ /**
+ * Creates a plain object from a MacVerifyRequest message. Also converts values to other types if specified.
+ * @param message MacVerifyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.MacVerifyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MacVerifyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MacVerifyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GenerateRandomBytesRequest. */
+ interface IGenerateRandomBytesRequest {
+
+ /** GenerateRandomBytesRequest location */
+ location?: (string|null);
+
+ /** GenerateRandomBytesRequest lengthBytes */
+ lengthBytes?: (number|null);
+
+ /** GenerateRandomBytesRequest protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents a GenerateRandomBytesRequest. */
+ class GenerateRandomBytesRequest implements IGenerateRandomBytesRequest {
+
+ /**
+ * Constructs a new GenerateRandomBytesRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGenerateRandomBytesRequest);
+
+ /** GenerateRandomBytesRequest location. */
+ public location: string;
+
+ /** GenerateRandomBytesRequest lengthBytes. */
+ public lengthBytes: number;
+
+ /** GenerateRandomBytesRequest protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new GenerateRandomBytesRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GenerateRandomBytesRequest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGenerateRandomBytesRequest): google.cloud.kms.v1.GenerateRandomBytesRequest;
+
+ /**
+ * Encodes the specified GenerateRandomBytesRequest message. Does not implicitly {@link google.cloud.kms.v1.GenerateRandomBytesRequest.verify|verify} messages.
+ * @param message GenerateRandomBytesRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGenerateRandomBytesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GenerateRandomBytesRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GenerateRandomBytesRequest.verify|verify} messages.
+ * @param message GenerateRandomBytesRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGenerateRandomBytesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GenerateRandomBytesRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GenerateRandomBytesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GenerateRandomBytesRequest;
+
+ /**
+ * Decodes a GenerateRandomBytesRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GenerateRandomBytesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GenerateRandomBytesRequest;
+
+ /**
+ * Verifies a GenerateRandomBytesRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GenerateRandomBytesRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GenerateRandomBytesRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GenerateRandomBytesRequest;
+
+ /**
+ * Creates a plain object from a GenerateRandomBytesRequest message. Also converts values to other types if specified.
+ * @param message GenerateRandomBytesRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GenerateRandomBytesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GenerateRandomBytesRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GenerateRandomBytesRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EncryptResponse. */
+ interface IEncryptResponse {
+
+ /** EncryptResponse name */
+ name?: (string|null);
+
+ /** EncryptResponse ciphertext */
+ ciphertext?: (Uint8Array|string|null);
+
+ /** EncryptResponse ciphertextCrc32c */
+ ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** EncryptResponse verifiedPlaintextCrc32c */
+ verifiedPlaintextCrc32c?: (boolean|null);
+
+ /** EncryptResponse verifiedAdditionalAuthenticatedDataCrc32c */
+ verifiedAdditionalAuthenticatedDataCrc32c?: (boolean|null);
+
+ /** EncryptResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents an EncryptResponse. */
+ class EncryptResponse implements IEncryptResponse {
+
+ /**
+ * Constructs a new EncryptResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IEncryptResponse);
+
+ /** EncryptResponse name. */
+ public name: string;
+
+ /** EncryptResponse ciphertext. */
+ public ciphertext: (Uint8Array|string);
+
+ /** EncryptResponse ciphertextCrc32c. */
+ public ciphertextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** EncryptResponse verifiedPlaintextCrc32c. */
+ public verifiedPlaintextCrc32c: boolean;
+
+ /** EncryptResponse verifiedAdditionalAuthenticatedDataCrc32c. */
+ public verifiedAdditionalAuthenticatedDataCrc32c: boolean;
+
+ /** EncryptResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new EncryptResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EncryptResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IEncryptResponse): google.cloud.kms.v1.EncryptResponse;
+
+ /**
+ * Encodes the specified EncryptResponse message. Does not implicitly {@link google.cloud.kms.v1.EncryptResponse.verify|verify} messages.
+ * @param message EncryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IEncryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EncryptResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EncryptResponse.verify|verify} messages.
+ * @param message EncryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IEncryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EncryptResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EncryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.EncryptResponse;
+
+ /**
+ * Decodes an EncryptResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EncryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.EncryptResponse;
+
+ /**
+ * Verifies an EncryptResponse message.
+ * @param message Plain 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 EncryptResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EncryptResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.EncryptResponse;
+
+ /**
+ * Creates a plain object from an EncryptResponse message. Also converts values to other types if specified.
+ * @param message EncryptResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.EncryptResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EncryptResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EncryptResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DecryptResponse. */
+ interface IDecryptResponse {
+
+ /** DecryptResponse plaintext */
+ plaintext?: (Uint8Array|string|null);
+
+ /** DecryptResponse plaintextCrc32c */
+ plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** DecryptResponse usedPrimary */
+ usedPrimary?: (boolean|null);
+
+ /** DecryptResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents a DecryptResponse. */
+ class DecryptResponse implements IDecryptResponse {
+
+ /**
+ * Constructs a new DecryptResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IDecryptResponse);
+
+ /** DecryptResponse plaintext. */
+ public plaintext: (Uint8Array|string);
+
+ /** DecryptResponse plaintextCrc32c. */
+ public plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** DecryptResponse usedPrimary. */
+ public usedPrimary: boolean;
+
+ /** DecryptResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new DecryptResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DecryptResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IDecryptResponse): google.cloud.kms.v1.DecryptResponse;
+
+ /**
+ * Encodes the specified DecryptResponse message. Does not implicitly {@link google.cloud.kms.v1.DecryptResponse.verify|verify} messages.
+ * @param message DecryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IDecryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DecryptResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.DecryptResponse.verify|verify} messages.
+ * @param message DecryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IDecryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DecryptResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DecryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.DecryptResponse;
+
+ /**
+ * Decodes a DecryptResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DecryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.DecryptResponse;
+
+ /**
+ * Verifies a DecryptResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DecryptResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DecryptResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.DecryptResponse;
+
+ /**
+ * Creates a plain object from a DecryptResponse message. Also converts values to other types if specified.
+ * @param message DecryptResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.DecryptResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DecryptResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DecryptResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AsymmetricSignResponse. */
+ interface IAsymmetricSignResponse {
+
+ /** AsymmetricSignResponse signature */
+ signature?: (Uint8Array|string|null);
+
+ /** AsymmetricSignResponse signatureCrc32c */
+ signatureCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricSignResponse verifiedDigestCrc32c */
+ verifiedDigestCrc32c?: (boolean|null);
+
+ /** AsymmetricSignResponse name */
+ name?: (string|null);
+
+ /** AsymmetricSignResponse verifiedDataCrc32c */
+ verifiedDataCrc32c?: (boolean|null);
+
+ /** AsymmetricSignResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents an AsymmetricSignResponse. */
+ class AsymmetricSignResponse implements IAsymmetricSignResponse {
+
+ /**
+ * Constructs a new AsymmetricSignResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IAsymmetricSignResponse);
+
+ /** AsymmetricSignResponse signature. */
+ public signature: (Uint8Array|string);
+
+ /** AsymmetricSignResponse signatureCrc32c. */
+ public signatureCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricSignResponse verifiedDigestCrc32c. */
+ public verifiedDigestCrc32c: boolean;
+
+ /** AsymmetricSignResponse name. */
+ public name: string;
+
+ /** AsymmetricSignResponse verifiedDataCrc32c. */
+ public verifiedDataCrc32c: boolean;
+
+ /** AsymmetricSignResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new AsymmetricSignResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AsymmetricSignResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IAsymmetricSignResponse): google.cloud.kms.v1.AsymmetricSignResponse;
+
+ /**
+ * Encodes the specified AsymmetricSignResponse message. Does not implicitly {@link google.cloud.kms.v1.AsymmetricSignResponse.verify|verify} messages.
+ * @param message AsymmetricSignResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IAsymmetricSignResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AsymmetricSignResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.AsymmetricSignResponse.verify|verify} messages.
+ * @param message AsymmetricSignResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IAsymmetricSignResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AsymmetricSignResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AsymmetricSignResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.AsymmetricSignResponse;
+
+ /**
+ * Decodes an AsymmetricSignResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AsymmetricSignResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.AsymmetricSignResponse;
+
+ /**
+ * Verifies an AsymmetricSignResponse message.
+ * @param message Plain 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 AsymmetricSignResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AsymmetricSignResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.AsymmetricSignResponse;
+
+ /**
+ * Creates a plain object from an AsymmetricSignResponse message. Also converts values to other types if specified.
+ * @param message AsymmetricSignResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.AsymmetricSignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AsymmetricSignResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AsymmetricSignResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AsymmetricDecryptResponse. */
+ interface IAsymmetricDecryptResponse {
+
+ /** AsymmetricDecryptResponse plaintext */
+ plaintext?: (Uint8Array|string|null);
+
+ /** AsymmetricDecryptResponse plaintextCrc32c */
+ plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricDecryptResponse verifiedCiphertextCrc32c */
+ verifiedCiphertextCrc32c?: (boolean|null);
+
+ /** AsymmetricDecryptResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents an AsymmetricDecryptResponse. */
+ class AsymmetricDecryptResponse implements IAsymmetricDecryptResponse {
+
+ /**
+ * Constructs a new AsymmetricDecryptResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IAsymmetricDecryptResponse);
+
+ /** AsymmetricDecryptResponse plaintext. */
+ public plaintext: (Uint8Array|string);
+
+ /** AsymmetricDecryptResponse plaintextCrc32c. */
+ public plaintextCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** AsymmetricDecryptResponse verifiedCiphertextCrc32c. */
+ public verifiedCiphertextCrc32c: boolean;
+
+ /** AsymmetricDecryptResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new AsymmetricDecryptResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AsymmetricDecryptResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IAsymmetricDecryptResponse): google.cloud.kms.v1.AsymmetricDecryptResponse;
+
+ /**
+ * Encodes the specified AsymmetricDecryptResponse message. Does not implicitly {@link google.cloud.kms.v1.AsymmetricDecryptResponse.verify|verify} messages.
+ * @param message AsymmetricDecryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IAsymmetricDecryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AsymmetricDecryptResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.AsymmetricDecryptResponse.verify|verify} messages.
+ * @param message AsymmetricDecryptResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IAsymmetricDecryptResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AsymmetricDecryptResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AsymmetricDecryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.AsymmetricDecryptResponse;
+
+ /**
+ * Decodes an AsymmetricDecryptResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AsymmetricDecryptResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.AsymmetricDecryptResponse;
+
+ /**
+ * Verifies an AsymmetricDecryptResponse message.
+ * @param message Plain 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 AsymmetricDecryptResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AsymmetricDecryptResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.AsymmetricDecryptResponse;
+
+ /**
+ * Creates a plain object from an AsymmetricDecryptResponse message. Also converts values to other types if specified.
+ * @param message AsymmetricDecryptResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.AsymmetricDecryptResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AsymmetricDecryptResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AsymmetricDecryptResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MacSignResponse. */
+ interface IMacSignResponse {
+
+ /** MacSignResponse name */
+ name?: (string|null);
+
+ /** MacSignResponse mac */
+ mac?: (Uint8Array|string|null);
+
+ /** MacSignResponse macCrc32c */
+ macCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** MacSignResponse verifiedDataCrc32c */
+ verifiedDataCrc32c?: (boolean|null);
+
+ /** MacSignResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents a MacSignResponse. */
+ class MacSignResponse implements IMacSignResponse {
+
+ /**
+ * Constructs a new MacSignResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IMacSignResponse);
+
+ /** MacSignResponse name. */
+ public name: string;
+
+ /** MacSignResponse mac. */
+ public mac: (Uint8Array|string);
+
+ /** MacSignResponse macCrc32c. */
+ public macCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /** MacSignResponse verifiedDataCrc32c. */
+ public verifiedDataCrc32c: boolean;
+
+ /** MacSignResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new MacSignResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MacSignResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IMacSignResponse): google.cloud.kms.v1.MacSignResponse;
+
+ /**
+ * Encodes the specified MacSignResponse message. Does not implicitly {@link google.cloud.kms.v1.MacSignResponse.verify|verify} messages.
+ * @param message MacSignResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IMacSignResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MacSignResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.MacSignResponse.verify|verify} messages.
+ * @param message MacSignResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IMacSignResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MacSignResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MacSignResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.MacSignResponse;
+
+ /**
+ * Decodes a MacSignResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MacSignResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.MacSignResponse;
+
+ /**
+ * Verifies a MacSignResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MacSignResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MacSignResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.MacSignResponse;
+
+ /**
+ * Creates a plain object from a MacSignResponse message. Also converts values to other types if specified.
+ * @param message MacSignResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.MacSignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MacSignResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MacSignResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MacVerifyResponse. */
+ interface IMacVerifyResponse {
+
+ /** MacVerifyResponse name */
+ name?: (string|null);
+
+ /** MacVerifyResponse success */
+ success?: (boolean|null);
+
+ /** MacVerifyResponse verifiedDataCrc32c */
+ verifiedDataCrc32c?: (boolean|null);
+
+ /** MacVerifyResponse verifiedMacCrc32c */
+ verifiedMacCrc32c?: (boolean|null);
+
+ /** MacVerifyResponse verifiedSuccessIntegrity */
+ verifiedSuccessIntegrity?: (boolean|null);
+
+ /** MacVerifyResponse protectionLevel */
+ protectionLevel?: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel|null);
+ }
+
+ /** Represents a MacVerifyResponse. */
+ class MacVerifyResponse implements IMacVerifyResponse {
+
+ /**
+ * Constructs a new MacVerifyResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IMacVerifyResponse);
+
+ /** MacVerifyResponse name. */
+ public name: string;
+
+ /** MacVerifyResponse success. */
+ public success: boolean;
+
+ /** MacVerifyResponse verifiedDataCrc32c. */
+ public verifiedDataCrc32c: boolean;
+
+ /** MacVerifyResponse verifiedMacCrc32c. */
+ public verifiedMacCrc32c: boolean;
+
+ /** MacVerifyResponse verifiedSuccessIntegrity. */
+ public verifiedSuccessIntegrity: boolean;
+
+ /** MacVerifyResponse protectionLevel. */
+ public protectionLevel: (google.cloud.kms.v1.ProtectionLevel|keyof typeof google.cloud.kms.v1.ProtectionLevel);
+
+ /**
+ * Creates a new MacVerifyResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MacVerifyResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IMacVerifyResponse): google.cloud.kms.v1.MacVerifyResponse;
+
+ /**
+ * Encodes the specified MacVerifyResponse message. Does not implicitly {@link google.cloud.kms.v1.MacVerifyResponse.verify|verify} messages.
+ * @param message MacVerifyResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IMacVerifyResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MacVerifyResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.MacVerifyResponse.verify|verify} messages.
+ * @param message MacVerifyResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IMacVerifyResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MacVerifyResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MacVerifyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.MacVerifyResponse;
+
+ /**
+ * Decodes a MacVerifyResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MacVerifyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.MacVerifyResponse;
+
+ /**
+ * Verifies a MacVerifyResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MacVerifyResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MacVerifyResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.MacVerifyResponse;
+
+ /**
+ * Creates a plain object from a MacVerifyResponse message. Also converts values to other types if specified.
+ * @param message MacVerifyResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.MacVerifyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MacVerifyResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MacVerifyResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GenerateRandomBytesResponse. */
+ interface IGenerateRandomBytesResponse {
+
+ /** GenerateRandomBytesResponse data */
+ data?: (Uint8Array|string|null);
+
+ /** GenerateRandomBytesResponse dataCrc32c */
+ dataCrc32c?: (google.protobuf.IInt64Value|null);
+ }
+
+ /** Represents a GenerateRandomBytesResponse. */
+ class GenerateRandomBytesResponse implements IGenerateRandomBytesResponse {
+
+ /**
+ * Constructs a new GenerateRandomBytesResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IGenerateRandomBytesResponse);
+
+ /** GenerateRandomBytesResponse data. */
+ public data: (Uint8Array|string);
+
+ /** GenerateRandomBytesResponse dataCrc32c. */
+ public dataCrc32c?: (google.protobuf.IInt64Value|null);
+
+ /**
+ * Creates a new GenerateRandomBytesResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GenerateRandomBytesResponse instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IGenerateRandomBytesResponse): google.cloud.kms.v1.GenerateRandomBytesResponse;
+
+ /**
+ * Encodes the specified GenerateRandomBytesResponse message. Does not implicitly {@link google.cloud.kms.v1.GenerateRandomBytesResponse.verify|verify} messages.
+ * @param message GenerateRandomBytesResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IGenerateRandomBytesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GenerateRandomBytesResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GenerateRandomBytesResponse.verify|verify} messages.
+ * @param message GenerateRandomBytesResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IGenerateRandomBytesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GenerateRandomBytesResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GenerateRandomBytesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.GenerateRandomBytesResponse;
+
+ /**
+ * Decodes a GenerateRandomBytesResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GenerateRandomBytesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.GenerateRandomBytesResponse;
+
+ /**
+ * Verifies a GenerateRandomBytesResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GenerateRandomBytesResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GenerateRandomBytesResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.GenerateRandomBytesResponse;
+
+ /**
+ * Creates a plain object from a GenerateRandomBytesResponse message. Also converts values to other types if specified.
+ * @param message GenerateRandomBytesResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.GenerateRandomBytesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GenerateRandomBytesResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GenerateRandomBytesResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Digest. */
+ interface IDigest {
+
+ /** Digest sha256 */
+ sha256?: (Uint8Array|string|null);
+
+ /** Digest sha384 */
+ sha384?: (Uint8Array|string|null);
+
+ /** Digest sha512 */
+ sha512?: (Uint8Array|string|null);
+ }
+
+ /** Represents a Digest. */
+ class Digest implements IDigest {
+
+ /**
+ * Constructs a new Digest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.IDigest);
+
+ /** Digest sha256. */
+ public sha256?: (Uint8Array|string|null);
+
+ /** Digest sha384. */
+ public sha384?: (Uint8Array|string|null);
+
+ /** Digest sha512. */
+ public sha512?: (Uint8Array|string|null);
+
+ /** Digest digest. */
+ public digest?: ("sha256"|"sha384"|"sha512");
+
+ /**
+ * Creates a new Digest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Digest instance
+ */
+ public static create(properties?: google.cloud.kms.v1.IDigest): google.cloud.kms.v1.Digest;
+
+ /**
+ * Encodes the specified Digest message. Does not implicitly {@link google.cloud.kms.v1.Digest.verify|verify} messages.
+ * @param message Digest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.IDigest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Digest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.Digest.verify|verify} messages.
+ * @param message Digest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.IDigest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Digest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Digest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.Digest;
+
+ /**
+ * Decodes a Digest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Digest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.Digest;
+
+ /**
+ * Verifies a Digest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Digest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Digest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.Digest;
+
+ /**
+ * Creates a plain object from a Digest message. Also converts values to other types if specified.
+ * @param message Digest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.Digest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Digest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Digest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a LocationMetadata. */
+ interface ILocationMetadata {
+
+ /** LocationMetadata hsmAvailable */
+ hsmAvailable?: (boolean|null);
+
+ /** LocationMetadata ekmAvailable */
+ ekmAvailable?: (boolean|null);
+ }
+
+ /** Represents a LocationMetadata. */
+ class LocationMetadata implements ILocationMetadata {
+
+ /**
+ * Constructs a new LocationMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.kms.v1.ILocationMetadata);
+
+ /** LocationMetadata hsmAvailable. */
+ public hsmAvailable: boolean;
+
+ /** LocationMetadata ekmAvailable. */
+ public ekmAvailable: boolean;
+
+ /**
+ * Creates a new LocationMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns LocationMetadata instance
+ */
+ public static create(properties?: google.cloud.kms.v1.ILocationMetadata): google.cloud.kms.v1.LocationMetadata;
+
+ /**
+ * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.kms.v1.LocationMetadata.verify|verify} messages.
+ * @param message LocationMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.kms.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.kms.v1.LocationMetadata.verify|verify} messages.
+ * @param message LocationMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.kms.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a LocationMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns LocationMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.kms.v1.LocationMetadata;
+
+ /**
+ * Decodes a LocationMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns LocationMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.kms.v1.LocationMetadata;
+
+ /**
+ * Verifies a LocationMetadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns LocationMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.LocationMetadata;
+
+ /**
+ * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified.
+ * @param message LocationMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.kms.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this LocationMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for LocationMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+ }
+
+ /** Namespace api. */
+ namespace api {
+
+ /** Properties of a Http. */
+ interface IHttp {
+
+ /** Http rules */
+ rules?: (google.api.IHttpRule[]|null);
+
+ /** Http fullyDecodeReservedExpansion */
+ fullyDecodeReservedExpansion?: (boolean|null);
+ }
+
+ /** Represents a Http. */
+ class Http implements IHttp {
+
+ /**
+ * Constructs a new Http.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttp);
+
+ /** Http rules. */
+ public rules: google.api.IHttpRule[];
+
+ /** Http fullyDecodeReservedExpansion. */
+ public fullyDecodeReservedExpansion: boolean;
+
+ /**
+ * Creates a new Http instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Http instance
+ */
+ public static create(properties?: google.api.IHttp): google.api.Http;
+
+ /**
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http;
+
+ /**
+ * Verifies a Http message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Http
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.Http;
+
+ /**
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
+ * @param message Http
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Http to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Http
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a HttpRule. */
+ interface IHttpRule {
+
+ /** HttpRule selector */
+ selector?: (string|null);
+
+ /** HttpRule get */
+ get?: (string|null);
+
+ /** HttpRule put */
+ put?: (string|null);
+
+ /** HttpRule post */
+ post?: (string|null);
+
+ /** HttpRule delete */
+ "delete"?: (string|null);
+
+ /** HttpRule patch */
+ patch?: (string|null);
+
+ /** HttpRule custom */
+ custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body */
+ body?: (string|null);
+
+ /** HttpRule responseBody */
+ responseBody?: (string|null);
+
+ /** HttpRule additionalBindings */
+ additionalBindings?: (google.api.IHttpRule[]|null);
+ }
+
+ /** Represents a HttpRule. */
+ class HttpRule implements IHttpRule {
+
+ /**
+ * Constructs a new HttpRule.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttpRule);
+
+ /** HttpRule selector. */
+ public selector: string;
+
+ /** HttpRule get. */
+ public get?: (string|null);
+
+ /** HttpRule put. */
+ public put?: (string|null);
+
+ /** HttpRule post. */
+ public post?: (string|null);
+
+ /** HttpRule delete. */
+ public delete?: (string|null);
+
+ /** HttpRule patch. */
+ public patch?: (string|null);
+
+ /** HttpRule custom. */
+ public custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body. */
+ public body: string;
+
+ /** HttpRule responseBody. */
+ public responseBody: string;
+
+ /** HttpRule additionalBindings. */
+ public additionalBindings: google.api.IHttpRule[];
+
+ /** HttpRule pattern. */
+ public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom");
+
+ /**
+ * Creates a new HttpRule instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns HttpRule instance
+ */
+ public static create(properties?: google.api.IHttpRule): google.api.HttpRule;
+
+ /**
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule;
+
+ /**
+ * Verifies a HttpRule message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns HttpRule
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.HttpRule;
+
+ /**
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
+ * @param message HttpRule
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this HttpRule to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for HttpRule
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CustomHttpPattern. */
+ interface ICustomHttpPattern {
+
+ /** CustomHttpPattern kind */
+ kind?: (string|null);
+
+ /** CustomHttpPattern path */
+ path?: (string|null);
+ }
+
+ /** Represents a CustomHttpPattern. */
+ class CustomHttpPattern implements ICustomHttpPattern {
+
+ /**
+ * Constructs a new CustomHttpPattern.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.ICustomHttpPattern);
+
+ /** CustomHttpPattern kind. */
+ public kind: string;
+
+ /** CustomHttpPattern path. */
+ public path: string;
+
+ /**
+ * Creates a new CustomHttpPattern instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CustomHttpPattern instance
+ */
+ public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern;
+
+ /**
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern;
+
+ /**
+ * Verifies a CustomHttpPattern message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CustomHttpPattern
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern;
+
+ /**
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
+ * @param message CustomHttpPattern
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CustomHttpPattern to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CustomHttpPattern
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** FieldBehavior enum. */
+ enum FieldBehavior {
+ FIELD_BEHAVIOR_UNSPECIFIED = 0,
+ OPTIONAL = 1,
+ REQUIRED = 2,
+ OUTPUT_ONLY = 3,
+ INPUT_ONLY = 4,
+ IMMUTABLE = 5,
+ UNORDERED_LIST = 6,
+ NON_EMPTY_DEFAULT = 7
+ }
+
+ /** Properties of a ResourceDescriptor. */
+ interface IResourceDescriptor {
+
+ /** ResourceDescriptor type */
+ type?: (string|null);
+
+ /** ResourceDescriptor pattern */
+ pattern?: (string[]|null);
+
+ /** ResourceDescriptor nameField */
+ nameField?: (string|null);
+
+ /** ResourceDescriptor history */
+ history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null);
+
+ /** ResourceDescriptor plural */
+ plural?: (string|null);
+
+ /** ResourceDescriptor singular */
+ singular?: (string|null);
+
+ /** ResourceDescriptor style */
+ style?: (google.api.ResourceDescriptor.Style[]|null);
+ }
+
+ /** Represents a ResourceDescriptor. */
+ class ResourceDescriptor implements IResourceDescriptor {
+
+ /**
+ * Constructs a new ResourceDescriptor.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IResourceDescriptor);
+
+ /** ResourceDescriptor type. */
+ public type: string;
+
+ /** ResourceDescriptor pattern. */
+ public pattern: string[];
+
+ /** ResourceDescriptor nameField. */
+ public nameField: string;
+
+ /** ResourceDescriptor history. */
+ public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History);
+
+ /** ResourceDescriptor plural. */
+ public plural: string;
+
+ /** ResourceDescriptor singular. */
+ public singular: string;
+
+ /** ResourceDescriptor style. */
+ public style: google.api.ResourceDescriptor.Style[];
+
+ /**
+ * Creates a new ResourceDescriptor instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ResourceDescriptor instance
+ */
+ public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor;
+
+ /**
+ * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @param message ResourceDescriptor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @param message ResourceDescriptor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor;
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor;
+
+ /**
+ * Verifies a ResourceDescriptor message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ResourceDescriptor
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor;
+
+ /**
+ * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
+ * @param message ResourceDescriptor
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ResourceDescriptor to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ResourceDescriptor
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ResourceDescriptor {
+
+ /** History enum. */
+ enum History {
+ HISTORY_UNSPECIFIED = 0,
+ ORIGINALLY_SINGLE_PATTERN = 1,
+ FUTURE_MULTI_PATTERN = 2
+ }
+
+ /** Style enum. */
+ enum Style {
+ STYLE_UNSPECIFIED = 0,
+ DECLARATIVE_FRIENDLY = 1
+ }
+ }
+
+ /** Properties of a ResourceReference. */
+ interface IResourceReference {
+
+ /** ResourceReference type */
+ type?: (string|null);
+
+ /** ResourceReference childType */
+ childType?: (string|null);
+ }
+
+ /** Represents a ResourceReference. */
+ class ResourceReference implements IResourceReference {
+
+ /**
+ * Constructs a new ResourceReference.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IResourceReference);
+
+ /** ResourceReference type. */
+ public type: string;
+
+ /** ResourceReference childType. */
+ public childType: string;
+
+ /**
+ * Creates a new ResourceReference instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ResourceReference instance
+ */
+ public static create(properties?: google.api.IResourceReference): google.api.ResourceReference;
+
+ /**
+ * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @param message ResourceReference message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @param message ResourceReference message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference;
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference;
+
+ /**
+ * Verifies a ResourceReference message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ResourceReference
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.ResourceReference;
+
+ /**
+ * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
+ * @param message ResourceReference
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ResourceReference to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ResourceReference
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Namespace protobuf. */
+ namespace protobuf {
+
+ /** Properties of a FileDescriptorSet. */
+ interface IFileDescriptorSet {
+
+ /** FileDescriptorSet file */
+ file?: (google.protobuf.IFileDescriptorProto[]|null);
+ }
+
+ /** Represents a FileDescriptorSet. */
+ class FileDescriptorSet implements IFileDescriptorSet {
+
+ /**
+ * Constructs a new FileDescriptorSet.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileDescriptorSet);
+
+ /** FileDescriptorSet file. */
+ public file: google.protobuf.IFileDescriptorProto[];
+
+ /**
+ * Creates a new FileDescriptorSet instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileDescriptorSet instance
+ */
+ public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @param message FileDescriptorSet message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @param message FileDescriptorSet message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Verifies a FileDescriptorSet message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileDescriptorSet
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
+ * @param message FileDescriptorSet
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileDescriptorSet to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileDescriptorSet
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FileDescriptorProto. */
+ interface IFileDescriptorProto {
+
+ /** FileDescriptorProto name */
+ name?: (string|null);
+
+ /** FileDescriptorProto package */
+ "package"?: (string|null);
+
+ /** FileDescriptorProto dependency */
+ dependency?: (string[]|null);
+
+ /** FileDescriptorProto publicDependency */
+ publicDependency?: (number[]|null);
+
+ /** FileDescriptorProto weakDependency */
+ weakDependency?: (number[]|null);
+
+ /** FileDescriptorProto messageType */
+ messageType?: (google.protobuf.IDescriptorProto[]|null);
+
+ /** FileDescriptorProto enumType */
+ enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
+
+ /** FileDescriptorProto service */
+ service?: (google.protobuf.IServiceDescriptorProto[]|null);
+
+ /** FileDescriptorProto extension */
+ extension?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** FileDescriptorProto options */
+ options?: (google.protobuf.IFileOptions|null);
+
+ /** FileDescriptorProto sourceCodeInfo */
+ sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
+
+ /** FileDescriptorProto syntax */
+ syntax?: (string|null);
+
+ /** FileDescriptorProto edition */
+ edition?: (string|null);
+ }
+
+ /** Represents a FileDescriptorProto. */
+ class FileDescriptorProto implements IFileDescriptorProto {
+
+ /**
+ * Constructs a new FileDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileDescriptorProto);
+
+ /** FileDescriptorProto name. */
+ public name: string;
+
+ /** FileDescriptorProto package. */
+ public package: string;
+
+ /** FileDescriptorProto dependency. */
+ public dependency: string[];
+
+ /** FileDescriptorProto publicDependency. */
+ public publicDependency: number[];
+
+ /** FileDescriptorProto weakDependency. */
+ public weakDependency: number[];
+
+ /** FileDescriptorProto messageType. */
+ public messageType: google.protobuf.IDescriptorProto[];
+
+ /** FileDescriptorProto enumType. */
+ public enumType: google.protobuf.IEnumDescriptorProto[];
+
+ /** FileDescriptorProto service. */
+ public service: google.protobuf.IServiceDescriptorProto[];
+
+ /** FileDescriptorProto extension. */
+ public extension: google.protobuf.IFieldDescriptorProto[];
+
+ /** FileDescriptorProto options. */
+ public options?: (google.protobuf.IFileOptions|null);
+
+ /** FileDescriptorProto sourceCodeInfo. */
+ public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
+
+ /** FileDescriptorProto syntax. */
+ public syntax: string;
+
+ /** FileDescriptorProto edition. */
+ public edition: string;
+
+ /**
+ * Creates a new FileDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @param message FileDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @param message FileDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Verifies a FileDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
+ * @param message FileDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DescriptorProto. */
+ interface IDescriptorProto {
+
+ /** DescriptorProto name */
+ name?: (string|null);
+
+ /** DescriptorProto field */
+ field?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** DescriptorProto extension */
+ extension?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** DescriptorProto nestedType */
+ nestedType?: (google.protobuf.IDescriptorProto[]|null);
+
+ /** DescriptorProto enumType */
+ enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
+
+ /** DescriptorProto extensionRange */
+ extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null);
+
+ /** DescriptorProto oneofDecl */
+ oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null);
+
+ /** DescriptorProto options */
+ options?: (google.protobuf.IMessageOptions|null);
+
+ /** DescriptorProto reservedRange */
+ reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null);
+
+ /** DescriptorProto reservedName */
+ reservedName?: (string[]|null);
+ }
+
+ /** Represents a DescriptorProto. */
+ class DescriptorProto implements IDescriptorProto {
+
+ /**
+ * Constructs a new DescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IDescriptorProto);
+
+ /** DescriptorProto name. */
+ public name: string;
+
+ /** DescriptorProto field. */
+ public field: google.protobuf.IFieldDescriptorProto[];
+
+ /** DescriptorProto extension. */
+ public extension: google.protobuf.IFieldDescriptorProto[];
+
+ /** DescriptorProto nestedType. */
+ public nestedType: google.protobuf.IDescriptorProto[];
+
+ /** DescriptorProto enumType. */
+ public enumType: google.protobuf.IEnumDescriptorProto[];
+
+ /** DescriptorProto extensionRange. */
+ public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[];
+
+ /** DescriptorProto oneofDecl. */
+ public oneofDecl: google.protobuf.IOneofDescriptorProto[];
+
+ /** DescriptorProto options. */
+ public options?: (google.protobuf.IMessageOptions|null);
+
+ /** DescriptorProto reservedRange. */
+ public reservedRange: google.protobuf.DescriptorProto.IReservedRange[];
+
+ /** DescriptorProto reservedName. */
+ public reservedName: string[];
+
+ /**
+ * Creates a new DescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto;
+
+ /**
+ * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @param message DescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @param message DescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto;
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto;
+
+ /**
+ * Verifies a DescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto;
+
+ /**
+ * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
+ * @param message DescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace DescriptorProto {
+
+ /** Properties of an ExtensionRange. */
+ interface IExtensionRange {
+
+ /** ExtensionRange start */
+ start?: (number|null);
+
+ /** ExtensionRange end */
+ end?: (number|null);
+
+ /** ExtensionRange options */
+ options?: (google.protobuf.IExtensionRangeOptions|null);
+ }
+
+ /** Represents an ExtensionRange. */
+ class ExtensionRange implements IExtensionRange {
+
+ /**
+ * Constructs a new ExtensionRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange);
+
+ /** ExtensionRange start. */
+ public start: number;
+
+ /** ExtensionRange end. */
+ public end: number;
+
+ /** ExtensionRange options. */
+ public options?: (google.protobuf.IExtensionRangeOptions|null);
+
+ /**
+ * Creates a new ExtensionRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ExtensionRange instance
+ */
+ public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @param message ExtensionRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @param message ExtensionRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Verifies an ExtensionRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ExtensionRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
+ * @param message ExtensionRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ExtensionRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ExtensionRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ReservedRange. */
+ interface IReservedRange {
+
+ /** ReservedRange start */
+ start?: (number|null);
+
+ /** ReservedRange end */
+ end?: (number|null);
+ }
+
+ /** Represents a ReservedRange. */
+ class ReservedRange implements IReservedRange {
+
+ /**
+ * Constructs a new ReservedRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.DescriptorProto.IReservedRange);
+
+ /** ReservedRange start. */
+ public start: number;
+
+ /** ReservedRange end. */
+ public end: number;
+
+ /**
+ * Creates a new ReservedRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ReservedRange instance
+ */
+ public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @param message ReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @param message ReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Verifies a ReservedRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ReservedRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
+ * @param message ReservedRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ReservedRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ReservedRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an ExtensionRangeOptions. */
+ interface IExtensionRangeOptions {
+
+ /** ExtensionRangeOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an ExtensionRangeOptions. */
+ class ExtensionRangeOptions implements IExtensionRangeOptions {
+
+ /**
+ * Constructs a new ExtensionRangeOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IExtensionRangeOptions);
+
+ /** ExtensionRangeOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new ExtensionRangeOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ExtensionRangeOptions instance
+ */
+ public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @param message ExtensionRangeOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @param message ExtensionRangeOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Verifies an ExtensionRangeOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ExtensionRangeOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
+ * @param message ExtensionRangeOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ExtensionRangeOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ExtensionRangeOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FieldDescriptorProto. */
+ interface IFieldDescriptorProto {
+
+ /** FieldDescriptorProto name */
+ name?: (string|null);
+
+ /** FieldDescriptorProto number */
+ number?: (number|null);
+
+ /** FieldDescriptorProto label */
+ label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null);
+
+ /** FieldDescriptorProto type */
+ type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null);
+
+ /** FieldDescriptorProto typeName */
+ typeName?: (string|null);
+
+ /** FieldDescriptorProto extendee */
+ extendee?: (string|null);
+
+ /** FieldDescriptorProto defaultValue */
+ defaultValue?: (string|null);
+
+ /** FieldDescriptorProto oneofIndex */
+ oneofIndex?: (number|null);
+
+ /** FieldDescriptorProto jsonName */
+ jsonName?: (string|null);
+
+ /** FieldDescriptorProto options */
+ options?: (google.protobuf.IFieldOptions|null);
+
+ /** FieldDescriptorProto proto3Optional */
+ proto3Optional?: (boolean|null);
+ }
+
+ /** Represents a FieldDescriptorProto. */
+ class FieldDescriptorProto implements IFieldDescriptorProto {
+
+ /**
+ * Constructs a new FieldDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldDescriptorProto);
+
+ /** FieldDescriptorProto name. */
+ public name: string;
+
+ /** FieldDescriptorProto number. */
+ public number: number;
+
+ /** FieldDescriptorProto label. */
+ public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label);
+
+ /** FieldDescriptorProto type. */
+ public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type);
+
+ /** FieldDescriptorProto typeName. */
+ public typeName: string;
+
+ /** FieldDescriptorProto extendee. */
+ public extendee: string;
+
+ /** FieldDescriptorProto defaultValue. */
+ public defaultValue: string;
+
+ /** FieldDescriptorProto oneofIndex. */
+ public oneofIndex: number;
+
+ /** FieldDescriptorProto jsonName. */
+ public jsonName: string;
+
+ /** FieldDescriptorProto options. */
+ public options?: (google.protobuf.IFieldOptions|null);
+
+ /** FieldDescriptorProto proto3Optional. */
+ public proto3Optional: boolean;
+
+ /**
+ * Creates a new FieldDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @param message FieldDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @param message FieldDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Verifies a FieldDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
+ * @param message FieldDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FieldDescriptorProto {
+
+ /** Type enum. */
+ enum Type {
+ TYPE_DOUBLE = 1,
+ TYPE_FLOAT = 2,
+ TYPE_INT64 = 3,
+ TYPE_UINT64 = 4,
+ TYPE_INT32 = 5,
+ TYPE_FIXED64 = 6,
+ TYPE_FIXED32 = 7,
+ TYPE_BOOL = 8,
+ TYPE_STRING = 9,
+ TYPE_GROUP = 10,
+ TYPE_MESSAGE = 11,
+ TYPE_BYTES = 12,
+ TYPE_UINT32 = 13,
+ TYPE_ENUM = 14,
+ TYPE_SFIXED32 = 15,
+ TYPE_SFIXED64 = 16,
+ TYPE_SINT32 = 17,
+ TYPE_SINT64 = 18
+ }
+
+ /** Label enum. */
+ enum Label {
+ LABEL_OPTIONAL = 1,
+ LABEL_REQUIRED = 2,
+ LABEL_REPEATED = 3
+ }
+ }
+
+ /** Properties of an OneofDescriptorProto. */
+ interface IOneofDescriptorProto {
+
+ /** OneofDescriptorProto name */
+ name?: (string|null);
+
+ /** OneofDescriptorProto options */
+ options?: (google.protobuf.IOneofOptions|null);
+ }
+
+ /** Represents an OneofDescriptorProto. */
+ class OneofDescriptorProto implements IOneofDescriptorProto {
+
+ /**
+ * Constructs a new OneofDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IOneofDescriptorProto);
+
+ /** OneofDescriptorProto name. */
+ public name: string;
+
+ /** OneofDescriptorProto options. */
+ public options?: (google.protobuf.IOneofOptions|null);
+
+ /**
+ * Creates a new OneofDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns OneofDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @param message OneofDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @param message OneofDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Verifies an OneofDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns OneofDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
+ * @param message OneofDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this OneofDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for OneofDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumDescriptorProto. */
+ interface IEnumDescriptorProto {
+
+ /** EnumDescriptorProto name */
+ name?: (string|null);
+
+ /** EnumDescriptorProto value */
+ value?: (google.protobuf.IEnumValueDescriptorProto[]|null);
+
+ /** EnumDescriptorProto options */
+ options?: (google.protobuf.IEnumOptions|null);
+
+ /** EnumDescriptorProto reservedRange */
+ reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null);
+
+ /** EnumDescriptorProto reservedName */
+ reservedName?: (string[]|null);
+ }
+
+ /** Represents an EnumDescriptorProto. */
+ class EnumDescriptorProto implements IEnumDescriptorProto {
+
+ /**
+ * Constructs a new EnumDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumDescriptorProto);
+
+ /** EnumDescriptorProto name. */
+ public name: string;
+
+ /** EnumDescriptorProto value. */
+ public value: google.protobuf.IEnumValueDescriptorProto[];
+
+ /** EnumDescriptorProto options. */
+ public options?: (google.protobuf.IEnumOptions|null);
+
+ /** EnumDescriptorProto reservedRange. */
+ public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[];
+
+ /** EnumDescriptorProto reservedName. */
+ public reservedName: string[];
+
+ /**
+ * Creates a new EnumDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @param message EnumDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @param message EnumDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Verifies an EnumDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
+ * @param message EnumDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace EnumDescriptorProto {
+
+ /** Properties of an EnumReservedRange. */
+ interface IEnumReservedRange {
+
+ /** EnumReservedRange start */
+ start?: (number|null);
+
+ /** EnumReservedRange end */
+ end?: (number|null);
+ }
+
+ /** Represents an EnumReservedRange. */
+ class EnumReservedRange implements IEnumReservedRange {
+
+ /**
+ * Constructs a new EnumReservedRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange);
+
+ /** EnumReservedRange start. */
+ public start: number;
+
+ /** EnumReservedRange end. */
+ public end: number;
+
+ /**
+ * Creates a new EnumReservedRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumReservedRange instance
+ */
+ public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @param message EnumReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @param message EnumReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Verifies an EnumReservedRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumReservedRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
+ * @param message EnumReservedRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumReservedRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumReservedRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an EnumValueDescriptorProto. */
+ interface IEnumValueDescriptorProto {
+
+ /** EnumValueDescriptorProto name */
+ name?: (string|null);
+
+ /** EnumValueDescriptorProto number */
+ number?: (number|null);
+
+ /** EnumValueDescriptorProto options */
+ options?: (google.protobuf.IEnumValueOptions|null);
+ }
+
+ /** Represents an EnumValueDescriptorProto. */
+ class EnumValueDescriptorProto implements IEnumValueDescriptorProto {
+
+ /**
+ * Constructs a new EnumValueDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumValueDescriptorProto);
+
+ /** EnumValueDescriptorProto name. */
+ public name: string;
+
+ /** EnumValueDescriptorProto number. */
+ public number: number;
+
+ /** EnumValueDescriptorProto options. */
+ public options?: (google.protobuf.IEnumValueOptions|null);
+
+ /**
+ * Creates a new EnumValueDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumValueDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @param message EnumValueDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @param message EnumValueDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Verifies an EnumValueDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumValueDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
+ * @param message EnumValueDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumValueDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumValueDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ServiceDescriptorProto. */
+ interface IServiceDescriptorProto {
+
+ /** ServiceDescriptorProto name */
+ name?: (string|null);
+
+ /** ServiceDescriptorProto method */
+ method?: (google.protobuf.IMethodDescriptorProto[]|null);
+
+ /** ServiceDescriptorProto options */
+ options?: (google.protobuf.IServiceOptions|null);
+ }
+
+ /** Represents a ServiceDescriptorProto. */
+ class ServiceDescriptorProto implements IServiceDescriptorProto {
+
+ /**
+ * Constructs a new ServiceDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IServiceDescriptorProto);
+
+ /** ServiceDescriptorProto name. */
+ public name: string;
+
+ /** ServiceDescriptorProto method. */
+ public method: google.protobuf.IMethodDescriptorProto[];
+
+ /** ServiceDescriptorProto options. */
+ public options?: (google.protobuf.IServiceOptions|null);
+
+ /**
+ * Creates a new ServiceDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ServiceDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @param message ServiceDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @param message ServiceDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Verifies a ServiceDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ServiceDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
+ * @param message ServiceDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ServiceDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ServiceDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MethodDescriptorProto. */
+ interface IMethodDescriptorProto {
+
+ /** MethodDescriptorProto name */
+ name?: (string|null);
+
+ /** MethodDescriptorProto inputType */
+ inputType?: (string|null);
+
+ /** MethodDescriptorProto outputType */
+ outputType?: (string|null);
+
+ /** MethodDescriptorProto options */
+ options?: (google.protobuf.IMethodOptions|null);
+
+ /** MethodDescriptorProto clientStreaming */
+ clientStreaming?: (boolean|null);
+
+ /** MethodDescriptorProto serverStreaming */
+ serverStreaming?: (boolean|null);
+ }
+
+ /** Represents a MethodDescriptorProto. */
+ class MethodDescriptorProto implements IMethodDescriptorProto {
+
+ /**
+ * Constructs a new MethodDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMethodDescriptorProto);
+
+ /** MethodDescriptorProto name. */
+ public name: string;
+
+ /** MethodDescriptorProto inputType. */
+ public inputType: string;
+
+ /** MethodDescriptorProto outputType. */
+ public outputType: string;
+
+ /** MethodDescriptorProto options. */
+ public options?: (google.protobuf.IMethodOptions|null);
+
+ /** MethodDescriptorProto clientStreaming. */
+ public clientStreaming: boolean;
+
+ /** MethodDescriptorProto serverStreaming. */
+ public serverStreaming: boolean;
+
+ /**
+ * Creates a new MethodDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MethodDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @param message MethodDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @param message MethodDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Verifies a MethodDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MethodDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
+ * @param message MethodDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MethodDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MethodDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FileOptions. */
+ interface IFileOptions {
+
+ /** FileOptions javaPackage */
+ javaPackage?: (string|null);
+
+ /** FileOptions javaOuterClassname */
+ javaOuterClassname?: (string|null);
+
+ /** FileOptions javaMultipleFiles */
+ javaMultipleFiles?: (boolean|null);
+
+ /** FileOptions javaGenerateEqualsAndHash */
+ javaGenerateEqualsAndHash?: (boolean|null);
+
+ /** FileOptions javaStringCheckUtf8 */
+ javaStringCheckUtf8?: (boolean|null);
+
+ /** FileOptions optimizeFor */
+ optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null);
+
+ /** FileOptions goPackage */
+ goPackage?: (string|null);
+
+ /** FileOptions ccGenericServices */
+ ccGenericServices?: (boolean|null);
+
+ /** FileOptions javaGenericServices */
+ javaGenericServices?: (boolean|null);
+
+ /** FileOptions pyGenericServices */
+ pyGenericServices?: (boolean|null);
+
+ /** FileOptions phpGenericServices */
+ phpGenericServices?: (boolean|null);
+
+ /** FileOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** FileOptions ccEnableArenas */
+ ccEnableArenas?: (boolean|null);
+
+ /** FileOptions objcClassPrefix */
+ objcClassPrefix?: (string|null);
+
+ /** FileOptions csharpNamespace */
+ csharpNamespace?: (string|null);
+
+ /** FileOptions swiftPrefix */
+ swiftPrefix?: (string|null);
+
+ /** FileOptions phpClassPrefix */
+ phpClassPrefix?: (string|null);
+
+ /** FileOptions phpNamespace */
+ phpNamespace?: (string|null);
+
+ /** FileOptions phpMetadataNamespace */
+ phpMetadataNamespace?: (string|null);
+
+ /** FileOptions rubyPackage */
+ rubyPackage?: (string|null);
+
+ /** FileOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** FileOptions .google.api.resourceDefinition */
+ ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null);
+ }
+
+ /** Represents a FileOptions. */
+ class FileOptions implements IFileOptions {
+
+ /**
+ * Constructs a new FileOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileOptions);
+
+ /** FileOptions javaPackage. */
+ public javaPackage: string;
+
+ /** FileOptions javaOuterClassname. */
+ public javaOuterClassname: string;
+
+ /** FileOptions javaMultipleFiles. */
+ public javaMultipleFiles: boolean;
+
+ /** FileOptions javaGenerateEqualsAndHash. */
+ public javaGenerateEqualsAndHash: boolean;
+
+ /** FileOptions javaStringCheckUtf8. */
+ public javaStringCheckUtf8: boolean;
+
+ /** FileOptions optimizeFor. */
+ public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode);
+
+ /** FileOptions goPackage. */
+ public goPackage: string;
+
+ /** FileOptions ccGenericServices. */
+ public ccGenericServices: boolean;
+
+ /** FileOptions javaGenericServices. */
+ public javaGenericServices: boolean;
+
+ /** FileOptions pyGenericServices. */
+ public pyGenericServices: boolean;
+
+ /** FileOptions phpGenericServices. */
+ public phpGenericServices: boolean;
+
+ /** FileOptions deprecated. */
+ public deprecated: boolean;
+
+ /** FileOptions ccEnableArenas. */
+ public ccEnableArenas: boolean;
+
+ /** FileOptions objcClassPrefix. */
+ public objcClassPrefix: string;
+
+ /** FileOptions csharpNamespace. */
+ public csharpNamespace: string;
+
+ /** FileOptions swiftPrefix. */
+ public swiftPrefix: string;
+
+ /** FileOptions phpClassPrefix. */
+ public phpClassPrefix: string;
+
+ /** FileOptions phpNamespace. */
+ public phpNamespace: string;
+
+ /** FileOptions phpMetadataNamespace. */
+ public phpMetadataNamespace: string;
+
+ /** FileOptions rubyPackage. */
+ public rubyPackage: string;
+
+ /** FileOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new FileOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileOptions instance
+ */
+ public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions;
+
+ /**
+ * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @param message FileOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @param message FileOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions;
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions;
+
+ /**
+ * Verifies a FileOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions;
+
+ /**
+ * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
+ * @param message FileOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FileOptions {
+
+ /** OptimizeMode enum. */
+ enum OptimizeMode {
+ SPEED = 1,
+ CODE_SIZE = 2,
+ LITE_RUNTIME = 3
+ }
+ }
+
+ /** Properties of a MessageOptions. */
+ interface IMessageOptions {
+
+ /** MessageOptions messageSetWireFormat */
+ messageSetWireFormat?: (boolean|null);
+
+ /** MessageOptions noStandardDescriptorAccessor */
+ noStandardDescriptorAccessor?: (boolean|null);
+
+ /** MessageOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** MessageOptions mapEntry */
+ mapEntry?: (boolean|null);
+
+ /** MessageOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** MessageOptions .google.api.resource */
+ ".google.api.resource"?: (google.api.IResourceDescriptor|null);
+ }
+
+ /** Represents a MessageOptions. */
+ class MessageOptions implements IMessageOptions {
+
+ /**
+ * Constructs a new MessageOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMessageOptions);
+
+ /** MessageOptions messageSetWireFormat. */
+ public messageSetWireFormat: boolean;
+
+ /** MessageOptions noStandardDescriptorAccessor. */
+ public noStandardDescriptorAccessor: boolean;
+
+ /** MessageOptions deprecated. */
+ public deprecated: boolean;
+
+ /** MessageOptions mapEntry. */
+ public mapEntry: boolean;
+
+ /** MessageOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new MessageOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MessageOptions instance
+ */
+ public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions;
+
+ /**
+ * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @param message MessageOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @param message MessageOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions;
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions;
+
+ /**
+ * Verifies a MessageOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MessageOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions;
+
+ /**
+ * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
+ * @param message MessageOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MessageOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MessageOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FieldOptions. */
+ interface IFieldOptions {
+
+ /** FieldOptions ctype */
+ ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null);
+
+ /** FieldOptions packed */
+ packed?: (boolean|null);
+
+ /** FieldOptions jstype */
+ jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null);
+
+ /** FieldOptions lazy */
+ lazy?: (boolean|null);
+
+ /** FieldOptions unverifiedLazy */
+ unverifiedLazy?: (boolean|null);
+
+ /** FieldOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** FieldOptions weak */
+ weak?: (boolean|null);
+
+ /** FieldOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** FieldOptions .google.api.fieldBehavior */
+ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null);
+
+ /** FieldOptions .google.api.resourceReference */
+ ".google.api.resourceReference"?: (google.api.IResourceReference|null);
+ }
+
+ /** Represents a FieldOptions. */
+ class FieldOptions implements IFieldOptions {
+
+ /**
+ * Constructs a new FieldOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldOptions);
+
+ /** FieldOptions ctype. */
+ public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType);
+
+ /** FieldOptions packed. */
+ public packed: boolean;
+
+ /** FieldOptions jstype. */
+ public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType);
+
+ /** FieldOptions lazy. */
+ public lazy: boolean;
+
+ /** FieldOptions unverifiedLazy. */
+ public unverifiedLazy: boolean;
+
+ /** FieldOptions deprecated. */
+ public deprecated: boolean;
+
+ /** FieldOptions weak. */
+ public weak: boolean;
+
+ /** FieldOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new FieldOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldOptions instance
+ */
+ public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions;
+
+ /**
+ * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @param message FieldOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @param message FieldOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions;
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions;
+
+ /**
+ * Verifies a FieldOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions;
+
+ /**
+ * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
+ * @param message FieldOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FieldOptions {
+
+ /** CType enum. */
+ enum CType {
+ STRING = 0,
+ CORD = 1,
+ STRING_PIECE = 2
+ }
+
+ /** JSType enum. */
+ enum JSType {
+ JS_NORMAL = 0,
+ JS_STRING = 1,
+ JS_NUMBER = 2
+ }
+ }
+
+ /** Properties of an OneofOptions. */
+ interface IOneofOptions {
+
+ /** OneofOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an OneofOptions. */
+ class OneofOptions implements IOneofOptions {
+
+ /**
+ * Constructs a new OneofOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IOneofOptions);
+
+ /** OneofOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new OneofOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns OneofOptions instance
+ */
+ public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions;
+
+ /**
+ * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @param message OneofOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @param message OneofOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions;
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions;
+
+ /**
+ * Verifies an OneofOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns OneofOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions;
+
+ /**
+ * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
+ * @param message OneofOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this OneofOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for OneofOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumOptions. */
+ interface IEnumOptions {
+
+ /** EnumOptions allowAlias */
+ allowAlias?: (boolean|null);
+
+ /** EnumOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** EnumOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an EnumOptions. */
+ class EnumOptions implements IEnumOptions {
+
+ /**
+ * Constructs a new EnumOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumOptions);
+
+ /** EnumOptions allowAlias. */
+ public allowAlias: boolean;
+
+ /** EnumOptions deprecated. */
+ public deprecated: boolean;
+
+ /** EnumOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new EnumOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumOptions instance
+ */
+ public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions;
+
+ /**
+ * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @param message EnumOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @param message EnumOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions;
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions;
+
+ /**
+ * Verifies an EnumOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions;
+
+ /**
+ * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
+ * @param message EnumOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumValueOptions. */
+ interface IEnumValueOptions {
+
+ /** EnumValueOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** EnumValueOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an EnumValueOptions. */
+ class EnumValueOptions implements IEnumValueOptions {
+
+ /**
+ * Constructs a new EnumValueOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumValueOptions);
+
+ /** EnumValueOptions deprecated. */
+ public deprecated: boolean;
+
+ /** EnumValueOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new EnumValueOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumValueOptions instance
+ */
+ public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions;
+
+ /**
+ * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @param message EnumValueOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @param message EnumValueOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions;
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions;
+
+ /**
+ * Verifies an EnumValueOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumValueOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions;
+
+ /**
+ * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
+ * @param message EnumValueOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumValueOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumValueOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ServiceOptions. */
+ interface IServiceOptions {
+
+ /** ServiceOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** ServiceOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** ServiceOptions .google.api.defaultHost */
+ ".google.api.defaultHost"?: (string|null);
+
+ /** ServiceOptions .google.api.oauthScopes */
+ ".google.api.oauthScopes"?: (string|null);
+ }
+
+ /** Represents a ServiceOptions. */
+ class ServiceOptions implements IServiceOptions {
+
+ /**
+ * Constructs a new ServiceOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IServiceOptions);
+
+ /** ServiceOptions deprecated. */
+ public deprecated: boolean;
+
+ /** ServiceOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new ServiceOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ServiceOptions instance
+ */
+ public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions;
+
+ /**
+ * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @param message ServiceOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @param message ServiceOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions;
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions;
+
+ /**
+ * Verifies a ServiceOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ServiceOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions;
+
+ /**
+ * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
+ * @param message ServiceOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ServiceOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ServiceOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MethodOptions. */
+ interface IMethodOptions {
+
+ /** MethodOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** MethodOptions idempotencyLevel */
+ idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null);
+
+ /** MethodOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** MethodOptions .google.api.http */
+ ".google.api.http"?: (google.api.IHttpRule|null);
+
+ /** MethodOptions .google.api.methodSignature */
+ ".google.api.methodSignature"?: (string[]|null);
+ }
+
+ /** Represents a MethodOptions. */
+ class MethodOptions implements IMethodOptions {
+
+ /**
+ * Constructs a new MethodOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMethodOptions);
+
+ /** MethodOptions deprecated. */
+ public deprecated: boolean;
+
+ /** MethodOptions idempotencyLevel. */
+ public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel);
+
+ /** MethodOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new MethodOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MethodOptions instance
+ */
+ public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions;
+
+ /**
+ * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @param message MethodOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @param message MethodOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions;
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions;
+
+ /**
+ * Verifies a MethodOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MethodOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions;
+
+ /**
+ * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
+ * @param message MethodOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MethodOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MethodOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace MethodOptions {
+
+ /** IdempotencyLevel enum. */
+ enum IdempotencyLevel {
+ IDEMPOTENCY_UNKNOWN = 0,
+ NO_SIDE_EFFECTS = 1,
+ IDEMPOTENT = 2
+ }
+ }
+
+ /** Properties of an UninterpretedOption. */
+ interface IUninterpretedOption {
+
+ /** UninterpretedOption name */
+ name?: (google.protobuf.UninterpretedOption.INamePart[]|null);
+
+ /** UninterpretedOption identifierValue */
+ identifierValue?: (string|null);
+
+ /** UninterpretedOption positiveIntValue */
+ positiveIntValue?: (number|Long|string|null);
+
+ /** UninterpretedOption negativeIntValue */
+ negativeIntValue?: (number|Long|string|null);
+
+ /** UninterpretedOption doubleValue */
+ doubleValue?: (number|null);
+
+ /** UninterpretedOption stringValue */
+ stringValue?: (Uint8Array|string|null);
+
+ /** UninterpretedOption aggregateValue */
+ aggregateValue?: (string|null);
+ }
+
+ /** Represents an UninterpretedOption. */
+ class UninterpretedOption implements IUninterpretedOption {
+
+ /**
+ * Constructs a new UninterpretedOption.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IUninterpretedOption);
+
+ /** UninterpretedOption name. */
+ public name: google.protobuf.UninterpretedOption.INamePart[];
+
+ /** UninterpretedOption identifierValue. */
+ public identifierValue: string;
+
+ /** UninterpretedOption positiveIntValue. */
+ public positiveIntValue: (number|Long|string);
+
+ /** UninterpretedOption negativeIntValue. */
+ public negativeIntValue: (number|Long|string);
+
+ /** UninterpretedOption doubleValue. */
+ public doubleValue: number;
+
+ /** UninterpretedOption stringValue. */
+ public stringValue: (Uint8Array|string);
+
+ /** UninterpretedOption aggregateValue. */
+ public aggregateValue: string;
+
+ /**
+ * Creates a new UninterpretedOption instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UninterpretedOption instance
+ */
+ public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption;
+
+ /**
+ * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @param message UninterpretedOption message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @param message UninterpretedOption message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption;
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption;
+
+ /**
+ * Verifies an UninterpretedOption message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UninterpretedOption
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption;
+
+ /**
+ * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
+ * @param message UninterpretedOption
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UninterpretedOption to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UninterpretedOption
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace UninterpretedOption {
+
+ /** Properties of a NamePart. */
+ interface INamePart {
+
+ /** NamePart namePart */
+ namePart: string;
+
+ /** NamePart isExtension */
+ isExtension: boolean;
+ }
+
+ /** Represents a NamePart. */
+ class NamePart implements INamePart {
+
+ /**
+ * Constructs a new NamePart.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.UninterpretedOption.INamePart);
+
+ /** NamePart namePart. */
+ public namePart: string;
+
+ /** NamePart isExtension. */
+ public isExtension: boolean;
+
+ /**
+ * Creates a new NamePart instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns NamePart instance
+ */
+ public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @param message NamePart message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @param message NamePart message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Verifies a NamePart message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a NamePart message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns NamePart
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Creates a plain object from a NamePart message. Also converts values to other types if specified.
+ * @param message NamePart
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this NamePart to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for NamePart
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a SourceCodeInfo. */
+ interface ISourceCodeInfo {
+
+ /** SourceCodeInfo location */
+ location?: (google.protobuf.SourceCodeInfo.ILocation[]|null);
+ }
+
+ /** Represents a SourceCodeInfo. */
+ class SourceCodeInfo implements ISourceCodeInfo {
+
+ /**
+ * Constructs a new SourceCodeInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.ISourceCodeInfo);
+
+ /** SourceCodeInfo location. */
+ public location: google.protobuf.SourceCodeInfo.ILocation[];
+
+ /**
+ * Creates a new SourceCodeInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SourceCodeInfo instance
+ */
+ public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
+ * @param message SourceCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
+ * @param message SourceCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SourceCodeInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SourceCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SourceCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Verifies a SourceCodeInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SourceCodeInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
+ * @param message SourceCodeInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SourceCodeInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SourceCodeInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace SourceCodeInfo {
+
+ /** Properties of a Location. */
+ interface ILocation {
+
+ /** Location path */
+ path?: (number[]|null);
+
+ /** Location span */
+ span?: (number[]|null);
+
+ /** Location leadingComments */
+ leadingComments?: (string|null);
+
+ /** Location trailingComments */
+ trailingComments?: (string|null);
+
+ /** Location leadingDetachedComments */
+ leadingDetachedComments?: (string[]|null);
+ }
+
+ /** Represents a Location. */
+ class Location implements ILocation {
+
+ /**
+ * Constructs a new Location.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.SourceCodeInfo.ILocation);
+
+ /** Location path. */
+ public path: number[];
+
+ /** Location span. */
+ public span: number[];
+
+ /** Location leadingComments. */
+ public leadingComments: string;
+
+ /** Location trailingComments. */
+ public trailingComments: string;
+
+ /** Location leadingDetachedComments. */
+ public leadingDetachedComments: string[];
+
+ /**
+ * Creates a new Location instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Location instance
+ */
+ public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
+ * @param message Location message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
+ * @param message Location message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Location message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Location
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Decodes a Location message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Location
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Verifies a Location message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Location message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Location
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Creates a plain object from a Location message. Also converts values to other types if specified.
+ * @param message Location
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Location to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Location
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a GeneratedCodeInfo. */
+ interface IGeneratedCodeInfo {
+
+ /** GeneratedCodeInfo annotation */
+ annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null);
+ }
+
+ /** Represents a GeneratedCodeInfo. */
+ class GeneratedCodeInfo implements IGeneratedCodeInfo {
+
+ /**
+ * Constructs a new GeneratedCodeInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IGeneratedCodeInfo);
+
+ /** GeneratedCodeInfo annotation. */
+ public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[];
+
+ /**
+ * Creates a new GeneratedCodeInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GeneratedCodeInfo instance
+ */
+ public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
+ * @param message GeneratedCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
+ * @param message GeneratedCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GeneratedCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GeneratedCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Verifies a GeneratedCodeInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GeneratedCodeInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
+ * @param message GeneratedCodeInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GeneratedCodeInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GeneratedCodeInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace GeneratedCodeInfo {
+
+ /** Properties of an Annotation. */
+ interface IAnnotation {
+
+ /** Annotation path */
+ path?: (number[]|null);
+
+ /** Annotation sourceFile */
+ sourceFile?: (string|null);
+
+ /** Annotation begin */
+ begin?: (number|null);
+
+ /** Annotation end */
+ end?: (number|null);
+
+ /** Annotation semantic */
+ semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null);
+ }
+
+ /** Represents an Annotation. */
+ class Annotation implements IAnnotation {
+
+ /**
+ * Constructs a new Annotation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation);
+
+ /** Annotation path. */
+ public path: number[];
+
+ /** Annotation sourceFile. */
+ public sourceFile: string;
+
+ /** Annotation begin. */
+ public begin: number;
+
+ /** Annotation end. */
+ public end: number;
+
+ /** Annotation semantic. */
+ public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic);
+
+ /**
+ * Creates a new Annotation instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Annotation instance
+ */
+ public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
+ * @param message Annotation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
+ * @param message Annotation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Annotation message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Annotation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Decodes an Annotation message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Annotation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Verifies an Annotation message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Annotation
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Creates a plain object from an Annotation message. Also converts values to other types if specified.
+ * @param message Annotation
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Annotation to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Annotation
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Annotation {
+
+ /** Semantic enum. */
+ enum Semantic {
+ NONE = 0,
+ SET = 1,
+ ALIAS = 2
+ }
+ }
+ }
+
+ /** Properties of a FieldMask. */
+ interface IFieldMask {
+
+ /** FieldMask paths */
+ paths?: (string[]|null);
+ }
+
+ /** Represents a FieldMask. */
+ class FieldMask implements IFieldMask {
+
+ /**
+ * Constructs a new FieldMask.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldMask);
+
+ /** FieldMask paths. */
+ public paths: string[];
+
+ /**
+ * Creates a new FieldMask instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldMask instance
+ */
+ public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask;
+
+ /**
+ * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
+ * @param message FieldMask message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
+ * @param message FieldMask message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldMask message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldMask
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask;
+
+ /**
+ * Decodes a FieldMask message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldMask
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask;
+
+ /**
+ * Verifies a FieldMask message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldMask
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask;
+
+ /**
+ * Creates a plain object from a FieldMask message. Also converts values to other types if specified.
+ * @param message FieldMask
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldMask to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldMask
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Timestamp. */
+ interface ITimestamp {
+
+ /** Timestamp seconds */
+ seconds?: (number|Long|string|null);
+
+ /** Timestamp nanos */
+ nanos?: (number|null);
+ }
+
+ /** Represents a Timestamp. */
+ class Timestamp implements ITimestamp {
+
+ /**
+ * Constructs a new Timestamp.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.ITimestamp);
+
+ /** Timestamp seconds. */
+ public seconds: (number|Long|string);
+
+ /** Timestamp nanos. */
+ public nanos: number;
+
+ /**
+ * Creates a new Timestamp instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Timestamp instance
+ */
+ public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp;
+
+ /**
+ * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
+ * @param message Timestamp message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
+ * @param message Timestamp message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Timestamp message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Timestamp
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp;
+
+ /**
+ * Decodes a Timestamp message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Timestamp
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp;
+
+ /**
+ * Verifies a Timestamp message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Timestamp message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Timestamp
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp;
+
+ /**
+ * Creates a plain object from a Timestamp message. Also converts values to other types if specified.
+ * @param message Timestamp
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Timestamp to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Timestamp
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Duration. */
+ interface IDuration {
+
+ /** Duration seconds */
+ seconds?: (number|Long|string|null);
+
+ /** Duration nanos */
+ nanos?: (number|null);
+ }
+
+ /** Represents a Duration. */
+ class Duration implements IDuration {
+
+ /**
+ * Constructs a new Duration.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IDuration);
+
+ /** Duration seconds. */
+ public seconds: (number|Long|string);
+
+ /** Duration nanos. */
+ public nanos: number;
+
+ /**
+ * Creates a new Duration instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Duration instance
+ */
+ public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration;
+
+ /**
+ * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
+ * @param message Duration message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
+ * @param message Duration message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Duration message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Duration
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration;
+
+ /**
+ * Decodes a Duration message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Duration
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration;
+
+ /**
+ * Verifies a Duration message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Duration message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Duration
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Duration;
+
+ /**
+ * Creates a plain object from a Duration message. Also converts values to other types if specified.
+ * @param message Duration
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Duration to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Duration
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DoubleValue. */
+ interface IDoubleValue {
+
+ /** DoubleValue value */
+ value?: (number|null);
+ }
+
+ /** Represents a DoubleValue. */
+ class DoubleValue implements IDoubleValue {
+
+ /**
+ * Constructs a new DoubleValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IDoubleValue);
+
+ /** DoubleValue value. */
+ public value: number;
+
+ /**
+ * Creates a new DoubleValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DoubleValue instance
+ */
+ public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue;
+
+ /**
+ * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
+ * @param message DoubleValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
+ * @param message DoubleValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DoubleValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DoubleValue
+ * @throws {Error} If the payload is not 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.DoubleValue;
+
+ /**
+ * Decodes a DoubleValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DoubleValue
+ * @throws {Error} If the payload 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.DoubleValue;
+
+ /**
+ * Verifies a DoubleValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DoubleValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue;
+
+ /**
+ * Creates a plain object from a DoubleValue message. Also converts values to other types if specified.
+ * @param message DoubleValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DoubleValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DoubleValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FloatValue. */
+ interface IFloatValue {
+
+ /** FloatValue value */
+ value?: (number|null);
+ }
+
+ /** Represents a FloatValue. */
+ class FloatValue implements IFloatValue {
+
+ /**
+ * Constructs a new FloatValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFloatValue);
+
+ /** FloatValue value. */
+ public value: number;
+
+ /**
+ * Creates a new FloatValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FloatValue instance
+ */
+ public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue;
+
+ /**
+ * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
+ * @param message FloatValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
+ * @param message FloatValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FloatValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FloatValue
+ * @throws {Error} If the payload is not 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.FloatValue;
+
+ /**
+ * Decodes a FloatValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FloatValue
+ * @throws {Error} If the payload 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.FloatValue;
+
+ /**
+ * Verifies a FloatValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FloatValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FloatValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue;
+
+ /**
+ * Creates a plain object from a FloatValue message. Also converts values to other types if specified.
+ * @param message FloatValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FloatValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FloatValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Int64Value. */
+ interface IInt64Value {
+
+ /** Int64Value value */
+ value?: (number|Long|string|null);
+ }
+
+ /** Represents an Int64Value. */
+ class Int64Value implements IInt64Value {
+
+ /**
+ * Constructs a new Int64Value.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IInt64Value);
+
+ /** Int64Value value. */
+ public value: (number|Long|string);
+
+ /**
+ * Creates a new Int64Value instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Int64Value instance
+ */
+ public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value;
+
+ /**
+ * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
+ * @param message Int64Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
+ * @param message Int64Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Int64Value message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Int64Value
+ * @throws {Error} If the payload is not 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.Int64Value;
+
+ /**
+ * Decodes an Int64Value message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Int64Value
+ * @throws {Error} If the payload 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.Int64Value;
+
+ /**
+ * Verifies an Int64Value message.
+ * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Int64Value
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value;
+
+ /**
+ * Creates a plain object from an Int64Value message. Also converts values to other types if specified.
+ * @param message Int64Value
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Int64Value to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Int64Value
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UInt64Value. */
+ interface IUInt64Value {
+
+ /** UInt64Value value */
+ value?: (number|Long|string|null);
+ }
+
+ /** Represents a UInt64Value. */
+ class UInt64Value implements IUInt64Value {
+
+ /**
+ * Constructs a new UInt64Value.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IUInt64Value);
+
+ /** UInt64Value value. */
+ public value: (number|Long|string);
+
+ /**
+ * Creates a new UInt64Value instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UInt64Value instance
+ */
+ public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value;
+
+ /**
+ * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
+ * @param message UInt64Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
+ * @param message UInt64Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UInt64Value message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UInt64Value
+ * @throws {Error} If the payload is not 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.UInt64Value;
+
+ /**
+ * Decodes a UInt64Value message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UInt64Value
+ * @throws {Error} If the payload 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.UInt64Value;
+
+ /**
+ * Verifies a UInt64Value message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UInt64Value
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value;
+
+ /**
+ * Creates a plain object from a UInt64Value message. Also converts values to other types if specified.
+ * @param message UInt64Value
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UInt64Value to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UInt64Value
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Int32Value. */
+ interface IInt32Value {
+
+ /** Int32Value value */
+ value?: (number|null);
+ }
+
+ /** Represents an Int32Value. */
+ class Int32Value implements IInt32Value {
+
+ /**
+ * Constructs a new Int32Value.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IInt32Value);
+
+ /** Int32Value value. */
+ public value: number;
+
+ /**
+ * Creates a new Int32Value instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Int32Value instance
+ */
+ public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value;
+
+ /**
+ * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
+ * @param message Int32Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
+ * @param message Int32Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Int32Value message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Int32Value
+ * @throws {Error} If the payload is not 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.Int32Value;
+
+ /**
+ * Decodes an Int32Value message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Int32Value
+ * @throws {Error} If the payload 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.Int32Value;
+
+ /**
+ * Verifies an Int32Value message.
+ * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Int32Value
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value;
+
+ /**
+ * Creates a plain object from an Int32Value message. Also converts values to other types if specified.
+ * @param message Int32Value
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Int32Value to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Int32Value
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UInt32Value. */
+ interface IUInt32Value {
+
+ /** UInt32Value value */
+ value?: (number|null);
+ }
+
+ /** Represents a UInt32Value. */
+ class UInt32Value implements IUInt32Value {
+
+ /**
+ * Constructs a new UInt32Value.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IUInt32Value);
+
+ /** UInt32Value value. */
+ public value: number;
+
+ /**
+ * Creates a new UInt32Value instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UInt32Value instance
+ */
+ public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value;
+
+ /**
+ * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
+ * @param message UInt32Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
+ * @param message UInt32Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UInt32Value message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UInt32Value
+ * @throws {Error} If the payload is not 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.UInt32Value;
+
+ /**
+ * Decodes a UInt32Value message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UInt32Value
+ * @throws {Error} If the payload 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.UInt32Value;
+
+ /**
+ * Verifies a UInt32Value message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UInt32Value
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value;
+
+ /**
+ * Creates a plain object from a UInt32Value message. Also converts values to other types if specified.
+ * @param message UInt32Value
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UInt32Value to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UInt32Value
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a BoolValue. */
+ interface IBoolValue {
+
+ /** BoolValue value */
+ value?: (boolean|null);
+ }
+
+ /** Represents a BoolValue. */
+ class BoolValue implements IBoolValue {
+
+ /**
+ * Constructs a new BoolValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IBoolValue);
+
+ /** BoolValue value. */
+ public value: boolean;
+
+ /**
+ * Creates a new BoolValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BoolValue instance
+ */
+ public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue;
+
+ /**
+ * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
+ * @param message BoolValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
+ * @param message BoolValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BoolValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BoolValue
+ * @throws {Error} If the payload is not 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.BoolValue;
+
+ /**
+ * Decodes a BoolValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BoolValue
+ * @throws {Error} If the payload 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.BoolValue;
+
+ /**
+ * Verifies a BoolValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BoolValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BoolValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue;
+
+ /**
+ * Creates a plain object from a BoolValue message. Also converts values to other types if specified.
+ * @param message BoolValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BoolValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BoolValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a StringValue. */
+ interface IStringValue {
+
+ /** StringValue value */
+ value?: (string|null);
+ }
+
+ /** Represents a StringValue. */
+ class StringValue implements IStringValue {
+
+ /**
+ * Constructs a new StringValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IStringValue);
+
+ /** StringValue value. */
+ public value: string;
+
+ /**
+ * Creates a new StringValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns StringValue instance
+ */
+ public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue;
+
+ /**
+ * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
+ * @param message StringValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
+ * @param message StringValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a StringValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns StringValue
+ * @throws {Error} If the payload is not 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.StringValue;
+
+ /**
+ * Decodes a StringValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns StringValue
+ * @throws {Error} If the payload 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.StringValue;
+
+ /**
+ * Verifies a StringValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a StringValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns StringValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue;
+
+ /**
+ * Creates a plain object from a StringValue message. Also converts values to other types if specified.
+ * @param message StringValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this StringValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for StringValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a BytesValue. */
+ interface IBytesValue {
+
+ /** BytesValue value */
+ value?: (Uint8Array|string|null);
+ }
+
+ /** Represents a BytesValue. */
+ class BytesValue implements IBytesValue {
+
+ /**
+ * Constructs a new BytesValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IBytesValue);
+
+ /** BytesValue value. */
+ public value: (Uint8Array|string);
+
+ /**
+ * Creates a new BytesValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BytesValue instance
+ */
+ public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue;
+
+ /**
+ * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
+ * @param message BytesValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
+ * @param message BytesValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BytesValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BytesValue
+ * @throws {Error} If the payload is not 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.BytesValue;
+
+ /**
+ * Decodes a BytesValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BytesValue
+ * @throws {Error} If the payload 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.BytesValue;
+
+ /**
+ * Verifies a BytesValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BytesValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BytesValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue;
+
+ /**
+ * Creates a plain object from a BytesValue message. Also converts values to other types if specified.
+ * @param message BytesValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BytesValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BytesValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+}
diff --git a/packages/google-cloud-kms/protos/protos.js b/packages/google-cloud-kms/protos/protos.js
new file mode 100644
index 00000000000..0bf83f9066c
--- /dev/null
+++ b/packages/google-cloud-kms/protos/protos.js
@@ -0,0 +1,32080 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
+(function(global, factory) { /* global define, require, module */
+
+ /* AMD */ if (typeof define === 'function' && define.amd)
+ define(["protobufjs/minimal"], factory);
+
+ /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
+ module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal);
+
+})(this, function($protobuf) {
+ "use strict";
+
+ // Common aliases
+ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
+
+ // Exported root namespace
+ var $root = $protobuf.roots._google_cloud_kms_protos || ($protobuf.roots._google_cloud_kms_protos = {});
+
+ $root.google = (function() {
+
+ /**
+ * Namespace google.
+ * @exports google
+ * @namespace
+ */
+ var google = {};
+
+ google.cloud = (function() {
+
+ /**
+ * Namespace cloud.
+ * @memberof google
+ * @namespace
+ */
+ var cloud = {};
+
+ cloud.kms = (function() {
+
+ /**
+ * Namespace kms.
+ * @memberof google.cloud
+ * @namespace
+ */
+ var kms = {};
+
+ kms.v1 = (function() {
+
+ /**
+ * Namespace v1.
+ * @memberof google.cloud.kms
+ * @namespace
+ */
+ var v1 = {};
+
+ v1.EkmService = (function() {
+
+ /**
+ * Constructs a new EkmService service.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an EkmService
+ * @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 EkmService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (EkmService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EkmService;
+
+ /**
+ * Creates new EkmService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.kms.v1.EkmService
+ * @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 {EkmService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ EkmService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|listEkmConnections}.
+ * @memberof google.cloud.kms.v1.EkmService
+ * @typedef ListEkmConnectionsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ListEkmConnectionsResponse} [response] ListEkmConnectionsResponse
+ */
+
+ /**
+ * Calls ListEkmConnections.
+ * @function listEkmConnections
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest} request ListEkmConnectionsRequest message or plain object
+ * @param {google.cloud.kms.v1.EkmService.ListEkmConnectionsCallback} callback Node-style callback called with the error, if any, and ListEkmConnectionsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(EkmService.prototype.listEkmConnections = function listEkmConnections(request, callback) {
+ return this.rpcCall(listEkmConnections, $root.google.cloud.kms.v1.ListEkmConnectionsRequest, $root.google.cloud.kms.v1.ListEkmConnectionsResponse, request, callback);
+ }, "name", { value: "ListEkmConnections" });
+
+ /**
+ * Calls ListEkmConnections.
+ * @function listEkmConnections
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest} request ListEkmConnectionsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|getEkmConnection}.
+ * @memberof google.cloud.kms.v1.EkmService
+ * @typedef GetEkmConnectionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.EkmConnection} [response] EkmConnection
+ */
+
+ /**
+ * Calls GetEkmConnection.
+ * @function getEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest} request GetEkmConnectionRequest message or plain object
+ * @param {google.cloud.kms.v1.EkmService.GetEkmConnectionCallback} callback Node-style callback called with the error, if any, and EkmConnection
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(EkmService.prototype.getEkmConnection = function getEkmConnection(request, callback) {
+ return this.rpcCall(getEkmConnection, $root.google.cloud.kms.v1.GetEkmConnectionRequest, $root.google.cloud.kms.v1.EkmConnection, request, callback);
+ }, "name", { value: "GetEkmConnection" });
+
+ /**
+ * Calls GetEkmConnection.
+ * @function getEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest} request GetEkmConnectionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|createEkmConnection}.
+ * @memberof google.cloud.kms.v1.EkmService
+ * @typedef CreateEkmConnectionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.EkmConnection} [response] EkmConnection
+ */
+
+ /**
+ * Calls CreateEkmConnection.
+ * @function createEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest} request CreateEkmConnectionRequest message or plain object
+ * @param {google.cloud.kms.v1.EkmService.CreateEkmConnectionCallback} callback Node-style callback called with the error, if any, and EkmConnection
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(EkmService.prototype.createEkmConnection = function createEkmConnection(request, callback) {
+ return this.rpcCall(createEkmConnection, $root.google.cloud.kms.v1.CreateEkmConnectionRequest, $root.google.cloud.kms.v1.EkmConnection, request, callback);
+ }, "name", { value: "CreateEkmConnection" });
+
+ /**
+ * Calls CreateEkmConnection.
+ * @function createEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest} request CreateEkmConnectionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.EkmService|updateEkmConnection}.
+ * @memberof google.cloud.kms.v1.EkmService
+ * @typedef UpdateEkmConnectionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.EkmConnection} [response] EkmConnection
+ */
+
+ /**
+ * Calls UpdateEkmConnection.
+ * @function updateEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest} request UpdateEkmConnectionRequest message or plain object
+ * @param {google.cloud.kms.v1.EkmService.UpdateEkmConnectionCallback} callback Node-style callback called with the error, if any, and EkmConnection
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(EkmService.prototype.updateEkmConnection = function updateEkmConnection(request, callback) {
+ return this.rpcCall(updateEkmConnection, $root.google.cloud.kms.v1.UpdateEkmConnectionRequest, $root.google.cloud.kms.v1.EkmConnection, request, callback);
+ }, "name", { value: "UpdateEkmConnection" });
+
+ /**
+ * Calls UpdateEkmConnection.
+ * @function updateEkmConnection
+ * @memberof google.cloud.kms.v1.EkmService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest} request UpdateEkmConnectionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return EkmService;
+ })();
+
+ v1.ListEkmConnectionsRequest = (function() {
+
+ /**
+ * Properties of a ListEkmConnectionsRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IListEkmConnectionsRequest
+ * @property {string|null} [parent] ListEkmConnectionsRequest parent
+ * @property {number|null} [pageSize] ListEkmConnectionsRequest pageSize
+ * @property {string|null} [pageToken] ListEkmConnectionsRequest pageToken
+ * @property {string|null} [filter] ListEkmConnectionsRequest filter
+ * @property {string|null} [orderBy] ListEkmConnectionsRequest orderBy
+ */
+
+ /**
+ * Constructs a new ListEkmConnectionsRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListEkmConnectionsRequest.
+ * @implements IListEkmConnectionsRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest=} [properties] Properties to set
+ */
+ function ListEkmConnectionsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListEkmConnectionsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ */
+ ListEkmConnectionsRequest.prototype.parent = "";
+
+ /**
+ * ListEkmConnectionsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ */
+ ListEkmConnectionsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListEkmConnectionsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ */
+ ListEkmConnectionsRequest.prototype.pageToken = "";
+
+ /**
+ * ListEkmConnectionsRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ */
+ ListEkmConnectionsRequest.prototype.filter = "";
+
+ /**
+ * ListEkmConnectionsRequest orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ */
+ ListEkmConnectionsRequest.prototype.orderBy = "";
+
+ /**
+ * Creates a new ListEkmConnectionsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsRequest} ListEkmConnectionsRequest instance
+ */
+ ListEkmConnectionsRequest.create = function create(properties) {
+ return new ListEkmConnectionsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListEkmConnectionsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest} message ListEkmConnectionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListEkmConnectionsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListEkmConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsRequest} message ListEkmConnectionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListEkmConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListEkmConnectionsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsRequest} ListEkmConnectionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListEkmConnectionsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListEkmConnectionsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pageToken = reader.string();
+ break;
+ }
+ case 4: {
+ message.filter = reader.string();
+ break;
+ }
+ case 5: {
+ message.orderBy = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListEkmConnectionsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsRequest} ListEkmConnectionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListEkmConnectionsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListEkmConnectionsRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListEkmConnectionsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListEkmConnectionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsRequest} ListEkmConnectionsRequest
+ */
+ ListEkmConnectionsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListEkmConnectionsRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListEkmConnectionsRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListEkmConnectionsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.ListEkmConnectionsRequest} message ListEkmConnectionsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListEkmConnectionsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ object.filter = "";
+ object.orderBy = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ return object;
+ };
+
+ /**
+ * Converts this ListEkmConnectionsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListEkmConnectionsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListEkmConnectionsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListEkmConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListEkmConnectionsRequest";
+ };
+
+ return ListEkmConnectionsRequest;
+ })();
+
+ v1.ListEkmConnectionsResponse = (function() {
+
+ /**
+ * Properties of a ListEkmConnectionsResponse.
+ * @memberof google.cloud.kms.v1
+ * @interface IListEkmConnectionsResponse
+ * @property {Array.|null} [ekmConnections] ListEkmConnectionsResponse ekmConnections
+ * @property {string|null} [nextPageToken] ListEkmConnectionsResponse nextPageToken
+ * @property {number|null} [totalSize] ListEkmConnectionsResponse totalSize
+ */
+
+ /**
+ * Constructs a new ListEkmConnectionsResponse.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListEkmConnectionsResponse.
+ * @implements IListEkmConnectionsResponse
+ * @constructor
+ * @param {google.cloud.kms.v1.IListEkmConnectionsResponse=} [properties] Properties to set
+ */
+ function ListEkmConnectionsResponse(properties) {
+ this.ekmConnections = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListEkmConnectionsResponse ekmConnections.
+ * @member {Array.} ekmConnections
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @instance
+ */
+ ListEkmConnectionsResponse.prototype.ekmConnections = $util.emptyArray;
+
+ /**
+ * ListEkmConnectionsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @instance
+ */
+ ListEkmConnectionsResponse.prototype.nextPageToken = "";
+
+ /**
+ * ListEkmConnectionsResponse totalSize.
+ * @member {number} totalSize
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @instance
+ */
+ ListEkmConnectionsResponse.prototype.totalSize = 0;
+
+ /**
+ * Creates a new ListEkmConnectionsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsResponse=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsResponse} ListEkmConnectionsResponse instance
+ */
+ ListEkmConnectionsResponse.create = function create(properties) {
+ return new ListEkmConnectionsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListEkmConnectionsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsResponse} message ListEkmConnectionsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListEkmConnectionsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.ekmConnections != null && message.ekmConnections.length)
+ for (var i = 0; i < message.ekmConnections.length; ++i)
+ $root.google.cloud.kms.v1.EkmConnection.encode(message.ekmConnections[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListEkmConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListEkmConnectionsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListEkmConnectionsResponse} message ListEkmConnectionsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListEkmConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListEkmConnectionsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsResponse} ListEkmConnectionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListEkmConnectionsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListEkmConnectionsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.ekmConnections && message.ekmConnections.length))
+ message.ekmConnections = [];
+ message.ekmConnections.push($root.google.cloud.kms.v1.EkmConnection.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.totalSize = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListEkmConnectionsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsResponse} ListEkmConnectionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListEkmConnectionsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListEkmConnectionsResponse message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListEkmConnectionsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.ekmConnections != null && message.hasOwnProperty("ekmConnections")) {
+ if (!Array.isArray(message.ekmConnections))
+ return "ekmConnections: array expected";
+ for (var i = 0; i < message.ekmConnections.length; ++i) {
+ var error = $root.google.cloud.kms.v1.EkmConnection.verify(message.ekmConnections[i]);
+ if (error)
+ return "ekmConnections." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ if (!$util.isInteger(message.totalSize))
+ return "totalSize: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListEkmConnectionsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListEkmConnectionsResponse} ListEkmConnectionsResponse
+ */
+ ListEkmConnectionsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListEkmConnectionsResponse)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListEkmConnectionsResponse();
+ if (object.ekmConnections) {
+ if (!Array.isArray(object.ekmConnections))
+ throw TypeError(".google.cloud.kms.v1.ListEkmConnectionsResponse.ekmConnections: array expected");
+ message.ekmConnections = [];
+ for (var i = 0; i < object.ekmConnections.length; ++i) {
+ if (typeof object.ekmConnections[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.ListEkmConnectionsResponse.ekmConnections: object expected");
+ message.ekmConnections[i] = $root.google.cloud.kms.v1.EkmConnection.fromObject(object.ekmConnections[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ if (object.totalSize != null)
+ message.totalSize = object.totalSize | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListEkmConnectionsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.ListEkmConnectionsResponse} message ListEkmConnectionsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListEkmConnectionsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.ekmConnections = [];
+ if (options.defaults) {
+ object.nextPageToken = "";
+ object.totalSize = 0;
+ }
+ if (message.ekmConnections && message.ekmConnections.length) {
+ object.ekmConnections = [];
+ for (var j = 0; j < message.ekmConnections.length; ++j)
+ object.ekmConnections[j] = $root.google.cloud.kms.v1.EkmConnection.toObject(message.ekmConnections[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ object.totalSize = message.totalSize;
+ return object;
+ };
+
+ /**
+ * Converts this ListEkmConnectionsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListEkmConnectionsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListEkmConnectionsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListEkmConnectionsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListEkmConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListEkmConnectionsResponse";
+ };
+
+ return ListEkmConnectionsResponse;
+ })();
+
+ v1.GetEkmConnectionRequest = (function() {
+
+ /**
+ * Properties of a GetEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetEkmConnectionRequest
+ * @property {string|null} [name] GetEkmConnectionRequest name
+ */
+
+ /**
+ * Constructs a new GetEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetEkmConnectionRequest.
+ * @implements IGetEkmConnectionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest=} [properties] Properties to set
+ */
+ function GetEkmConnectionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetEkmConnectionRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @instance
+ */
+ GetEkmConnectionRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetEkmConnectionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetEkmConnectionRequest} GetEkmConnectionRequest instance
+ */
+ GetEkmConnectionRequest.create = function create(properties) {
+ return new GetEkmConnectionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.GetEkmConnectionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest} message GetEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetEkmConnectionRequest.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 GetEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetEkmConnectionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetEkmConnectionRequest} message GetEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetEkmConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetEkmConnectionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetEkmConnectionRequest} GetEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetEkmConnectionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetEkmConnectionRequest();
+ 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 GetEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetEkmConnectionRequest} GetEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetEkmConnectionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetEkmConnectionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetEkmConnectionRequest.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 GetEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetEkmConnectionRequest} GetEkmConnectionRequest
+ */
+ GetEkmConnectionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetEkmConnectionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetEkmConnectionRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetEkmConnectionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetEkmConnectionRequest} message GetEkmConnectionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetEkmConnectionRequest.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 GetEkmConnectionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetEkmConnectionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetEkmConnectionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetEkmConnectionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetEkmConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetEkmConnectionRequest";
+ };
+
+ return GetEkmConnectionRequest;
+ })();
+
+ v1.CreateEkmConnectionRequest = (function() {
+
+ /**
+ * Properties of a CreateEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface ICreateEkmConnectionRequest
+ * @property {string|null} [parent] CreateEkmConnectionRequest parent
+ * @property {string|null} [ekmConnectionId] CreateEkmConnectionRequest ekmConnectionId
+ * @property {google.cloud.kms.v1.IEkmConnection|null} [ekmConnection] CreateEkmConnectionRequest ekmConnection
+ */
+
+ /**
+ * Constructs a new CreateEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CreateEkmConnectionRequest.
+ * @implements ICreateEkmConnectionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest=} [properties] Properties to set
+ */
+ function CreateEkmConnectionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateEkmConnectionRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @instance
+ */
+ CreateEkmConnectionRequest.prototype.parent = "";
+
+ /**
+ * CreateEkmConnectionRequest ekmConnectionId.
+ * @member {string} ekmConnectionId
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @instance
+ */
+ CreateEkmConnectionRequest.prototype.ekmConnectionId = "";
+
+ /**
+ * CreateEkmConnectionRequest ekmConnection.
+ * @member {google.cloud.kms.v1.IEkmConnection|null|undefined} ekmConnection
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @instance
+ */
+ CreateEkmConnectionRequest.prototype.ekmConnection = null;
+
+ /**
+ * Creates a new CreateEkmConnectionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CreateEkmConnectionRequest} CreateEkmConnectionRequest instance
+ */
+ CreateEkmConnectionRequest.create = function create(properties) {
+ return new CreateEkmConnectionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateEkmConnectionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest} message CreateEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateEkmConnectionRequest.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.ekmConnectionId != null && Object.hasOwnProperty.call(message, "ekmConnectionId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.ekmConnectionId);
+ if (message.ekmConnection != null && Object.hasOwnProperty.call(message, "ekmConnection"))
+ $root.google.cloud.kms.v1.EkmConnection.encode(message.ekmConnection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateEkmConnectionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateEkmConnectionRequest} message CreateEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateEkmConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateEkmConnectionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CreateEkmConnectionRequest} CreateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateEkmConnectionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CreateEkmConnectionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.ekmConnectionId = reader.string();
+ break;
+ }
+ case 3: {
+ message.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CreateEkmConnectionRequest} CreateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateEkmConnectionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateEkmConnectionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateEkmConnectionRequest.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.ekmConnectionId != null && message.hasOwnProperty("ekmConnectionId"))
+ if (!$util.isString(message.ekmConnectionId))
+ return "ekmConnectionId: string expected";
+ if (message.ekmConnection != null && message.hasOwnProperty("ekmConnection")) {
+ var error = $root.google.cloud.kms.v1.EkmConnection.verify(message.ekmConnection);
+ if (error)
+ return "ekmConnection." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CreateEkmConnectionRequest} CreateEkmConnectionRequest
+ */
+ CreateEkmConnectionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CreateEkmConnectionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CreateEkmConnectionRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.ekmConnectionId != null)
+ message.ekmConnectionId = String(object.ekmConnectionId);
+ if (object.ekmConnection != null) {
+ if (typeof object.ekmConnection !== "object")
+ throw TypeError(".google.cloud.kms.v1.CreateEkmConnectionRequest.ekmConnection: object expected");
+ message.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.fromObject(object.ekmConnection);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateEkmConnectionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.CreateEkmConnectionRequest} message CreateEkmConnectionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateEkmConnectionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.ekmConnectionId = "";
+ object.ekmConnection = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.ekmConnectionId != null && message.hasOwnProperty("ekmConnectionId"))
+ object.ekmConnectionId = message.ekmConnectionId;
+ if (message.ekmConnection != null && message.hasOwnProperty("ekmConnection"))
+ object.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.toObject(message.ekmConnection, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateEkmConnectionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateEkmConnectionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateEkmConnectionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CreateEkmConnectionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateEkmConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CreateEkmConnectionRequest";
+ };
+
+ return CreateEkmConnectionRequest;
+ })();
+
+ v1.UpdateEkmConnectionRequest = (function() {
+
+ /**
+ * Properties of an UpdateEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IUpdateEkmConnectionRequest
+ * @property {google.cloud.kms.v1.IEkmConnection|null} [ekmConnection] UpdateEkmConnectionRequest ekmConnection
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEkmConnectionRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateEkmConnectionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an UpdateEkmConnectionRequest.
+ * @implements IUpdateEkmConnectionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest=} [properties] Properties to set
+ */
+ function UpdateEkmConnectionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateEkmConnectionRequest ekmConnection.
+ * @member {google.cloud.kms.v1.IEkmConnection|null|undefined} ekmConnection
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @instance
+ */
+ UpdateEkmConnectionRequest.prototype.ekmConnection = null;
+
+ /**
+ * UpdateEkmConnectionRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @instance
+ */
+ UpdateEkmConnectionRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateEkmConnectionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.UpdateEkmConnectionRequest} UpdateEkmConnectionRequest instance
+ */
+ UpdateEkmConnectionRequest.create = function create(properties) {
+ return new UpdateEkmConnectionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateEkmConnectionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateEkmConnectionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest} message UpdateEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateEkmConnectionRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.ekmConnection != null && Object.hasOwnProperty.call(message, "ekmConnection"))
+ $root.google.cloud.kms.v1.EkmConnection.encode(message.ekmConnection, 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 UpdateEkmConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateEkmConnectionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateEkmConnectionRequest} message UpdateEkmConnectionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateEkmConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateEkmConnectionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.UpdateEkmConnectionRequest} UpdateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateEkmConnectionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.UpdateEkmConnectionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateEkmConnectionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.UpdateEkmConnectionRequest} UpdateEkmConnectionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateEkmConnectionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateEkmConnectionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateEkmConnectionRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.ekmConnection != null && message.hasOwnProperty("ekmConnection")) {
+ var error = $root.google.cloud.kms.v1.EkmConnection.verify(message.ekmConnection);
+ if (error)
+ return "ekmConnection." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateEkmConnectionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.UpdateEkmConnectionRequest} UpdateEkmConnectionRequest
+ */
+ UpdateEkmConnectionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.UpdateEkmConnectionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.UpdateEkmConnectionRequest();
+ if (object.ekmConnection != null) {
+ if (typeof object.ekmConnection !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateEkmConnectionRequest.ekmConnection: object expected");
+ message.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.fromObject(object.ekmConnection);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateEkmConnectionRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateEkmConnectionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {google.cloud.kms.v1.UpdateEkmConnectionRequest} message UpdateEkmConnectionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateEkmConnectionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.ekmConnection = null;
+ object.updateMask = null;
+ }
+ if (message.ekmConnection != null && message.hasOwnProperty("ekmConnection"))
+ object.ekmConnection = $root.google.cloud.kms.v1.EkmConnection.toObject(message.ekmConnection, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateEkmConnectionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateEkmConnectionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateEkmConnectionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.UpdateEkmConnectionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateEkmConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.UpdateEkmConnectionRequest";
+ };
+
+ return UpdateEkmConnectionRequest;
+ })();
+
+ v1.Certificate = (function() {
+
+ /**
+ * Properties of a Certificate.
+ * @memberof google.cloud.kms.v1
+ * @interface ICertificate
+ * @property {Uint8Array|null} [rawDer] Certificate rawDer
+ * @property {boolean|null} [parsed] Certificate parsed
+ * @property {string|null} [issuer] Certificate issuer
+ * @property {string|null} [subject] Certificate subject
+ * @property {Array.|null} [subjectAlternativeDnsNames] Certificate subjectAlternativeDnsNames
+ * @property {google.protobuf.ITimestamp|null} [notBeforeTime] Certificate notBeforeTime
+ * @property {google.protobuf.ITimestamp|null} [notAfterTime] Certificate notAfterTime
+ * @property {string|null} [serialNumber] Certificate serialNumber
+ * @property {string|null} [sha256Fingerprint] Certificate sha256Fingerprint
+ */
+
+ /**
+ * Constructs a new Certificate.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a Certificate.
+ * @implements ICertificate
+ * @constructor
+ * @param {google.cloud.kms.v1.ICertificate=} [properties] Properties to set
+ */
+ function Certificate(properties) {
+ this.subjectAlternativeDnsNames = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Certificate rawDer.
+ * @member {Uint8Array} rawDer
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.rawDer = $util.newBuffer([]);
+
+ /**
+ * Certificate parsed.
+ * @member {boolean} parsed
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.parsed = false;
+
+ /**
+ * Certificate issuer.
+ * @member {string} issuer
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.issuer = "";
+
+ /**
+ * Certificate subject.
+ * @member {string} subject
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.subject = "";
+
+ /**
+ * Certificate subjectAlternativeDnsNames.
+ * @member {Array.} subjectAlternativeDnsNames
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.subjectAlternativeDnsNames = $util.emptyArray;
+
+ /**
+ * Certificate notBeforeTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} notBeforeTime
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.notBeforeTime = null;
+
+ /**
+ * Certificate notAfterTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} notAfterTime
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.notAfterTime = null;
+
+ /**
+ * Certificate serialNumber.
+ * @member {string} serialNumber
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.serialNumber = "";
+
+ /**
+ * Certificate sha256Fingerprint.
+ * @member {string} sha256Fingerprint
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ */
+ Certificate.prototype.sha256Fingerprint = "";
+
+ /**
+ * Creates a new Certificate instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {google.cloud.kms.v1.ICertificate=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.Certificate} Certificate instance
+ */
+ Certificate.create = function create(properties) {
+ return new Certificate(properties);
+ };
+
+ /**
+ * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.kms.v1.Certificate.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {google.cloud.kms.v1.ICertificate} message Certificate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Certificate.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.rawDer != null && Object.hasOwnProperty.call(message, "rawDer"))
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rawDer);
+ if (message.parsed != null && Object.hasOwnProperty.call(message, "parsed"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.parsed);
+ if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.issuer);
+ if (message.subject != null && Object.hasOwnProperty.call(message, "subject"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.subject);
+ if (message.subjectAlternativeDnsNames != null && message.subjectAlternativeDnsNames.length)
+ for (var i = 0; i < message.subjectAlternativeDnsNames.length; ++i)
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.subjectAlternativeDnsNames[i]);
+ if (message.notBeforeTime != null && Object.hasOwnProperty.call(message, "notBeforeTime"))
+ $root.google.protobuf.Timestamp.encode(message.notBeforeTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.notAfterTime != null && Object.hasOwnProperty.call(message, "notAfterTime"))
+ $root.google.protobuf.Timestamp.encode(message.notAfterTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.serialNumber != null && Object.hasOwnProperty.call(message, "serialNumber"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.serialNumber);
+ if (message.sha256Fingerprint != null && Object.hasOwnProperty.call(message, "sha256Fingerprint"))
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.sha256Fingerprint);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.Certificate.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {google.cloud.kms.v1.ICertificate} message Certificate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Certificate.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Certificate message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.Certificate} Certificate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Certificate.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.Certificate();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.rawDer = reader.bytes();
+ break;
+ }
+ case 2: {
+ message.parsed = reader.bool();
+ break;
+ }
+ case 3: {
+ message.issuer = reader.string();
+ break;
+ }
+ case 4: {
+ message.subject = reader.string();
+ break;
+ }
+ case 5: {
+ if (!(message.subjectAlternativeDnsNames && message.subjectAlternativeDnsNames.length))
+ message.subjectAlternativeDnsNames = [];
+ message.subjectAlternativeDnsNames.push(reader.string());
+ break;
+ }
+ case 6: {
+ message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.serialNumber = reader.string();
+ break;
+ }
+ case 9: {
+ message.sha256Fingerprint = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Certificate message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.Certificate} Certificate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Certificate.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Certificate message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Certificate.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.rawDer != null && message.hasOwnProperty("rawDer"))
+ if (!(message.rawDer && typeof message.rawDer.length === "number" || $util.isString(message.rawDer)))
+ return "rawDer: buffer expected";
+ if (message.parsed != null && message.hasOwnProperty("parsed"))
+ if (typeof message.parsed !== "boolean")
+ return "parsed: boolean expected";
+ if (message.issuer != null && message.hasOwnProperty("issuer"))
+ if (!$util.isString(message.issuer))
+ return "issuer: string expected";
+ if (message.subject != null && message.hasOwnProperty("subject"))
+ if (!$util.isString(message.subject))
+ return "subject: string expected";
+ if (message.subjectAlternativeDnsNames != null && message.hasOwnProperty("subjectAlternativeDnsNames")) {
+ if (!Array.isArray(message.subjectAlternativeDnsNames))
+ return "subjectAlternativeDnsNames: array expected";
+ for (var i = 0; i < message.subjectAlternativeDnsNames.length; ++i)
+ if (!$util.isString(message.subjectAlternativeDnsNames[i]))
+ return "subjectAlternativeDnsNames: string[] expected";
+ }
+ if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.notBeforeTime);
+ if (error)
+ return "notBeforeTime." + error;
+ }
+ if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.notAfterTime);
+ if (error)
+ return "notAfterTime." + error;
+ }
+ if (message.serialNumber != null && message.hasOwnProperty("serialNumber"))
+ if (!$util.isString(message.serialNumber))
+ return "serialNumber: string expected";
+ if (message.sha256Fingerprint != null && message.hasOwnProperty("sha256Fingerprint"))
+ if (!$util.isString(message.sha256Fingerprint))
+ return "sha256Fingerprint: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Certificate message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.Certificate} Certificate
+ */
+ Certificate.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.Certificate)
+ return object;
+ var message = new $root.google.cloud.kms.v1.Certificate();
+ if (object.rawDer != null)
+ if (typeof object.rawDer === "string")
+ $util.base64.decode(object.rawDer, message.rawDer = $util.newBuffer($util.base64.length(object.rawDer)), 0);
+ else if (object.rawDer.length >= 0)
+ message.rawDer = object.rawDer;
+ if (object.parsed != null)
+ message.parsed = Boolean(object.parsed);
+ if (object.issuer != null)
+ message.issuer = String(object.issuer);
+ if (object.subject != null)
+ message.subject = String(object.subject);
+ if (object.subjectAlternativeDnsNames) {
+ if (!Array.isArray(object.subjectAlternativeDnsNames))
+ throw TypeError(".google.cloud.kms.v1.Certificate.subjectAlternativeDnsNames: array expected");
+ message.subjectAlternativeDnsNames = [];
+ for (var i = 0; i < object.subjectAlternativeDnsNames.length; ++i)
+ message.subjectAlternativeDnsNames[i] = String(object.subjectAlternativeDnsNames[i]);
+ }
+ if (object.notBeforeTime != null) {
+ if (typeof object.notBeforeTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.Certificate.notBeforeTime: object expected");
+ message.notBeforeTime = $root.google.protobuf.Timestamp.fromObject(object.notBeforeTime);
+ }
+ if (object.notAfterTime != null) {
+ if (typeof object.notAfterTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.Certificate.notAfterTime: object expected");
+ message.notAfterTime = $root.google.protobuf.Timestamp.fromObject(object.notAfterTime);
+ }
+ if (object.serialNumber != null)
+ message.serialNumber = String(object.serialNumber);
+ if (object.sha256Fingerprint != null)
+ message.sha256Fingerprint = String(object.sha256Fingerprint);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Certificate message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {google.cloud.kms.v1.Certificate} message Certificate
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Certificate.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.subjectAlternativeDnsNames = [];
+ if (options.defaults) {
+ if (options.bytes === String)
+ object.rawDer = "";
+ else {
+ object.rawDer = [];
+ if (options.bytes !== Array)
+ object.rawDer = $util.newBuffer(object.rawDer);
+ }
+ object.parsed = false;
+ object.issuer = "";
+ object.subject = "";
+ object.notBeforeTime = null;
+ object.notAfterTime = null;
+ object.serialNumber = "";
+ object.sha256Fingerprint = "";
+ }
+ if (message.rawDer != null && message.hasOwnProperty("rawDer"))
+ object.rawDer = options.bytes === String ? $util.base64.encode(message.rawDer, 0, message.rawDer.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawDer) : message.rawDer;
+ if (message.parsed != null && message.hasOwnProperty("parsed"))
+ object.parsed = message.parsed;
+ if (message.issuer != null && message.hasOwnProperty("issuer"))
+ object.issuer = message.issuer;
+ if (message.subject != null && message.hasOwnProperty("subject"))
+ object.subject = message.subject;
+ if (message.subjectAlternativeDnsNames && message.subjectAlternativeDnsNames.length) {
+ object.subjectAlternativeDnsNames = [];
+ for (var j = 0; j < message.subjectAlternativeDnsNames.length; ++j)
+ object.subjectAlternativeDnsNames[j] = message.subjectAlternativeDnsNames[j];
+ }
+ if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime"))
+ object.notBeforeTime = $root.google.protobuf.Timestamp.toObject(message.notBeforeTime, options);
+ if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime"))
+ object.notAfterTime = $root.google.protobuf.Timestamp.toObject(message.notAfterTime, options);
+ if (message.serialNumber != null && message.hasOwnProperty("serialNumber"))
+ object.serialNumber = message.serialNumber;
+ if (message.sha256Fingerprint != null && message.hasOwnProperty("sha256Fingerprint"))
+ object.sha256Fingerprint = message.sha256Fingerprint;
+ return object;
+ };
+
+ /**
+ * Converts this Certificate to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.Certificate
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Certificate.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Certificate
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.Certificate
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Certificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.Certificate";
+ };
+
+ return Certificate;
+ })();
+
+ v1.EkmConnection = (function() {
+
+ /**
+ * Properties of an EkmConnection.
+ * @memberof google.cloud.kms.v1
+ * @interface IEkmConnection
+ * @property {string|null} [name] EkmConnection name
+ * @property {google.protobuf.ITimestamp|null} [createTime] EkmConnection createTime
+ * @property {Array.|null} [serviceResolvers] EkmConnection serviceResolvers
+ * @property {string|null} [etag] EkmConnection etag
+ */
+
+ /**
+ * Constructs a new EkmConnection.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an EkmConnection.
+ * @implements IEkmConnection
+ * @constructor
+ * @param {google.cloud.kms.v1.IEkmConnection=} [properties] Properties to set
+ */
+ function EkmConnection(properties) {
+ this.serviceResolvers = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EkmConnection name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @instance
+ */
+ EkmConnection.prototype.name = "";
+
+ /**
+ * EkmConnection createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @instance
+ */
+ EkmConnection.prototype.createTime = null;
+
+ /**
+ * EkmConnection serviceResolvers.
+ * @member {Array.} serviceResolvers
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @instance
+ */
+ EkmConnection.prototype.serviceResolvers = $util.emptyArray;
+
+ /**
+ * EkmConnection etag.
+ * @member {string} etag
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @instance
+ */
+ EkmConnection.prototype.etag = "";
+
+ /**
+ * Creates a new EkmConnection instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {google.cloud.kms.v1.IEkmConnection=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.EkmConnection} EkmConnection instance
+ */
+ EkmConnection.create = function create(properties) {
+ return new EkmConnection(properties);
+ };
+
+ /**
+ * Encodes the specified EkmConnection message. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {google.cloud.kms.v1.IEkmConnection} message EkmConnection message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EkmConnection.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.serviceResolvers != null && message.serviceResolvers.length)
+ for (var i = 0; i < message.serviceResolvers.length; ++i)
+ $root.google.cloud.kms.v1.EkmConnection.ServiceResolver.encode(message.serviceResolvers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.etag != null && Object.hasOwnProperty.call(message, "etag"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EkmConnection message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {google.cloud.kms.v1.IEkmConnection} message EkmConnection message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EkmConnection.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EkmConnection message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.EkmConnection} EkmConnection
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EkmConnection.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.EkmConnection();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ if (!(message.serviceResolvers && message.serviceResolvers.length))
+ message.serviceResolvers = [];
+ message.serviceResolvers.push($root.google.cloud.kms.v1.EkmConnection.ServiceResolver.decode(reader, reader.uint32()));
+ break;
+ }
+ case 5: {
+ message.etag = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EkmConnection message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.EkmConnection} EkmConnection
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EkmConnection.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EkmConnection message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EkmConnection.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.serviceResolvers != null && message.hasOwnProperty("serviceResolvers")) {
+ if (!Array.isArray(message.serviceResolvers))
+ return "serviceResolvers: array expected";
+ for (var i = 0; i < message.serviceResolvers.length; ++i) {
+ var error = $root.google.cloud.kms.v1.EkmConnection.ServiceResolver.verify(message.serviceResolvers[i]);
+ if (error)
+ return "serviceResolvers." + error;
+ }
+ }
+ if (message.etag != null && message.hasOwnProperty("etag"))
+ if (!$util.isString(message.etag))
+ return "etag: string expected";
+ return null;
+ };
+
+ /**
+ * Creates an EkmConnection message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.EkmConnection} EkmConnection
+ */
+ EkmConnection.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.EkmConnection)
+ return object;
+ var message = new $root.google.cloud.kms.v1.EkmConnection();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.EkmConnection.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.serviceResolvers) {
+ if (!Array.isArray(object.serviceResolvers))
+ throw TypeError(".google.cloud.kms.v1.EkmConnection.serviceResolvers: array expected");
+ message.serviceResolvers = [];
+ for (var i = 0; i < object.serviceResolvers.length; ++i) {
+ if (typeof object.serviceResolvers[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.EkmConnection.serviceResolvers: object expected");
+ message.serviceResolvers[i] = $root.google.cloud.kms.v1.EkmConnection.ServiceResolver.fromObject(object.serviceResolvers[i]);
+ }
+ }
+ if (object.etag != null)
+ message.etag = String(object.etag);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EkmConnection message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {google.cloud.kms.v1.EkmConnection} message EkmConnection
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EkmConnection.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.serviceResolvers = [];
+ if (options.defaults) {
+ object.name = "";
+ object.createTime = null;
+ object.etag = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.serviceResolvers && message.serviceResolvers.length) {
+ object.serviceResolvers = [];
+ for (var j = 0; j < message.serviceResolvers.length; ++j)
+ object.serviceResolvers[j] = $root.google.cloud.kms.v1.EkmConnection.ServiceResolver.toObject(message.serviceResolvers[j], options);
+ }
+ if (message.etag != null && message.hasOwnProperty("etag"))
+ object.etag = message.etag;
+ return object;
+ };
+
+ /**
+ * Converts this EkmConnection to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EkmConnection.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EkmConnection
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EkmConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.EkmConnection";
+ };
+
+ EkmConnection.ServiceResolver = (function() {
+
+ /**
+ * Properties of a ServiceResolver.
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @interface IServiceResolver
+ * @property {string|null} [serviceDirectoryService] ServiceResolver serviceDirectoryService
+ * @property {string|null} [endpointFilter] ServiceResolver endpointFilter
+ * @property {string|null} [hostname] ServiceResolver hostname
+ * @property {Array.|null} [serverCertificates] ServiceResolver serverCertificates
+ */
+
+ /**
+ * Constructs a new ServiceResolver.
+ * @memberof google.cloud.kms.v1.EkmConnection
+ * @classdesc Represents a ServiceResolver.
+ * @implements IServiceResolver
+ * @constructor
+ * @param {google.cloud.kms.v1.EkmConnection.IServiceResolver=} [properties] Properties to set
+ */
+ function ServiceResolver(properties) {
+ this.serverCertificates = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ServiceResolver serviceDirectoryService.
+ * @member {string} serviceDirectoryService
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @instance
+ */
+ ServiceResolver.prototype.serviceDirectoryService = "";
+
+ /**
+ * ServiceResolver endpointFilter.
+ * @member {string} endpointFilter
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @instance
+ */
+ ServiceResolver.prototype.endpointFilter = "";
+
+ /**
+ * ServiceResolver hostname.
+ * @member {string} hostname
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @instance
+ */
+ ServiceResolver.prototype.hostname = "";
+
+ /**
+ * ServiceResolver serverCertificates.
+ * @member {Array.} serverCertificates
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @instance
+ */
+ ServiceResolver.prototype.serverCertificates = $util.emptyArray;
+
+ /**
+ * Creates a new ServiceResolver instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {google.cloud.kms.v1.EkmConnection.IServiceResolver=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.EkmConnection.ServiceResolver} ServiceResolver instance
+ */
+ ServiceResolver.create = function create(properties) {
+ return new ServiceResolver(properties);
+ };
+
+ /**
+ * Encodes the specified ServiceResolver message. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.ServiceResolver.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {google.cloud.kms.v1.EkmConnection.IServiceResolver} message ServiceResolver message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceResolver.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.serviceDirectoryService != null && Object.hasOwnProperty.call(message, "serviceDirectoryService"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceDirectoryService);
+ if (message.endpointFilter != null && Object.hasOwnProperty.call(message, "endpointFilter"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpointFilter);
+ if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.hostname);
+ if (message.serverCertificates != null && message.serverCertificates.length)
+ for (var i = 0; i < message.serverCertificates.length; ++i)
+ $root.google.cloud.kms.v1.Certificate.encode(message.serverCertificates[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ServiceResolver message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EkmConnection.ServiceResolver.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {google.cloud.kms.v1.EkmConnection.IServiceResolver} message ServiceResolver message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceResolver.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ServiceResolver message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.EkmConnection.ServiceResolver} ServiceResolver
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceResolver.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.EkmConnection.ServiceResolver();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.serviceDirectoryService = reader.string();
+ break;
+ }
+ case 2: {
+ message.endpointFilter = reader.string();
+ break;
+ }
+ case 3: {
+ message.hostname = reader.string();
+ break;
+ }
+ case 4: {
+ if (!(message.serverCertificates && message.serverCertificates.length))
+ message.serverCertificates = [];
+ message.serverCertificates.push($root.google.cloud.kms.v1.Certificate.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ServiceResolver message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.EkmConnection.ServiceResolver} ServiceResolver
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceResolver.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ServiceResolver message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ServiceResolver.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.serviceDirectoryService != null && message.hasOwnProperty("serviceDirectoryService"))
+ if (!$util.isString(message.serviceDirectoryService))
+ return "serviceDirectoryService: string expected";
+ if (message.endpointFilter != null && message.hasOwnProperty("endpointFilter"))
+ if (!$util.isString(message.endpointFilter))
+ return "endpointFilter: string expected";
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ if (!$util.isString(message.hostname))
+ return "hostname: string expected";
+ if (message.serverCertificates != null && message.hasOwnProperty("serverCertificates")) {
+ if (!Array.isArray(message.serverCertificates))
+ return "serverCertificates: array expected";
+ for (var i = 0; i < message.serverCertificates.length; ++i) {
+ var error = $root.google.cloud.kms.v1.Certificate.verify(message.serverCertificates[i]);
+ if (error)
+ return "serverCertificates." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ServiceResolver message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.EkmConnection.ServiceResolver} ServiceResolver
+ */
+ ServiceResolver.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.EkmConnection.ServiceResolver)
+ return object;
+ var message = new $root.google.cloud.kms.v1.EkmConnection.ServiceResolver();
+ if (object.serviceDirectoryService != null)
+ message.serviceDirectoryService = String(object.serviceDirectoryService);
+ if (object.endpointFilter != null)
+ message.endpointFilter = String(object.endpointFilter);
+ if (object.hostname != null)
+ message.hostname = String(object.hostname);
+ if (object.serverCertificates) {
+ if (!Array.isArray(object.serverCertificates))
+ throw TypeError(".google.cloud.kms.v1.EkmConnection.ServiceResolver.serverCertificates: array expected");
+ message.serverCertificates = [];
+ for (var i = 0; i < object.serverCertificates.length; ++i) {
+ if (typeof object.serverCertificates[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.EkmConnection.ServiceResolver.serverCertificates: object expected");
+ message.serverCertificates[i] = $root.google.cloud.kms.v1.Certificate.fromObject(object.serverCertificates[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ServiceResolver message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {google.cloud.kms.v1.EkmConnection.ServiceResolver} message ServiceResolver
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ServiceResolver.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.serverCertificates = [];
+ if (options.defaults) {
+ object.serviceDirectoryService = "";
+ object.endpointFilter = "";
+ object.hostname = "";
+ }
+ if (message.serviceDirectoryService != null && message.hasOwnProperty("serviceDirectoryService"))
+ object.serviceDirectoryService = message.serviceDirectoryService;
+ if (message.endpointFilter != null && message.hasOwnProperty("endpointFilter"))
+ object.endpointFilter = message.endpointFilter;
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ object.hostname = message.hostname;
+ if (message.serverCertificates && message.serverCertificates.length) {
+ object.serverCertificates = [];
+ for (var j = 0; j < message.serverCertificates.length; ++j)
+ object.serverCertificates[j] = $root.google.cloud.kms.v1.Certificate.toObject(message.serverCertificates[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ServiceResolver to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ServiceResolver.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ServiceResolver
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.EkmConnection.ServiceResolver
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ServiceResolver.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.EkmConnection.ServiceResolver";
+ };
+
+ return ServiceResolver;
+ })();
+
+ return EkmConnection;
+ })();
+
+ v1.KeyRing = (function() {
+
+ /**
+ * Properties of a KeyRing.
+ * @memberof google.cloud.kms.v1
+ * @interface IKeyRing
+ * @property {string|null} [name] KeyRing name
+ * @property {google.protobuf.ITimestamp|null} [createTime] KeyRing createTime
+ */
+
+ /**
+ * Constructs a new KeyRing.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a KeyRing.
+ * @implements IKeyRing
+ * @constructor
+ * @param {google.cloud.kms.v1.IKeyRing=} [properties] Properties to set
+ */
+ function KeyRing(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * KeyRing name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @instance
+ */
+ KeyRing.prototype.name = "";
+
+ /**
+ * KeyRing createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @instance
+ */
+ KeyRing.prototype.createTime = null;
+
+ /**
+ * Creates a new KeyRing instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {google.cloud.kms.v1.IKeyRing=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.KeyRing} KeyRing instance
+ */
+ KeyRing.create = function create(properties) {
+ return new KeyRing(properties);
+ };
+
+ /**
+ * Encodes the specified KeyRing message. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {google.cloud.kms.v1.IKeyRing} message KeyRing message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ KeyRing.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified KeyRing message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyRing.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {google.cloud.kms.v1.IKeyRing} message KeyRing message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ KeyRing.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a KeyRing message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.KeyRing} KeyRing
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ KeyRing.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyRing();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a KeyRing message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.KeyRing} KeyRing
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ KeyRing.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a KeyRing message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ KeyRing.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a KeyRing message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.KeyRing} KeyRing
+ */
+ KeyRing.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.KeyRing)
+ return object;
+ var message = new $root.google.cloud.kms.v1.KeyRing();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.KeyRing.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a KeyRing message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {google.cloud.kms.v1.KeyRing} message KeyRing
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ KeyRing.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.createTime = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ return object;
+ };
+
+ /**
+ * Converts this KeyRing to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ KeyRing.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for KeyRing
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.KeyRing
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ KeyRing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.KeyRing";
+ };
+
+ return KeyRing;
+ })();
+
+ v1.CryptoKey = (function() {
+
+ /**
+ * Properties of a CryptoKey.
+ * @memberof google.cloud.kms.v1
+ * @interface ICryptoKey
+ * @property {string|null} [name] CryptoKey name
+ * @property {google.cloud.kms.v1.ICryptoKeyVersion|null} [primary] CryptoKey primary
+ * @property {google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose|null} [purpose] CryptoKey purpose
+ * @property {google.protobuf.ITimestamp|null} [createTime] CryptoKey createTime
+ * @property {google.protobuf.ITimestamp|null} [nextRotationTime] CryptoKey nextRotationTime
+ * @property {google.protobuf.IDuration|null} [rotationPeriod] CryptoKey rotationPeriod
+ * @property {google.cloud.kms.v1.ICryptoKeyVersionTemplate|null} [versionTemplate] CryptoKey versionTemplate
+ * @property {Object.|null} [labels] CryptoKey labels
+ * @property {boolean|null} [importOnly] CryptoKey importOnly
+ * @property {google.protobuf.IDuration|null} [destroyScheduledDuration] CryptoKey destroyScheduledDuration
+ * @property {string|null} [cryptoKeyBackend] CryptoKey cryptoKeyBackend
+ */
+
+ /**
+ * Constructs a new CryptoKey.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CryptoKey.
+ * @implements ICryptoKey
+ * @constructor
+ * @param {google.cloud.kms.v1.ICryptoKey=} [properties] Properties to set
+ */
+ function CryptoKey(properties) {
+ this.labels = {};
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CryptoKey name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.name = "";
+
+ /**
+ * CryptoKey primary.
+ * @member {google.cloud.kms.v1.ICryptoKeyVersion|null|undefined} primary
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.primary = null;
+
+ /**
+ * CryptoKey purpose.
+ * @member {google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose} purpose
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.purpose = 0;
+
+ /**
+ * CryptoKey createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.createTime = null;
+
+ /**
+ * CryptoKey nextRotationTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} nextRotationTime
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.nextRotationTime = null;
+
+ /**
+ * CryptoKey rotationPeriod.
+ * @member {google.protobuf.IDuration|null|undefined} rotationPeriod
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.rotationPeriod = null;
+
+ /**
+ * CryptoKey versionTemplate.
+ * @member {google.cloud.kms.v1.ICryptoKeyVersionTemplate|null|undefined} versionTemplate
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.versionTemplate = null;
+
+ /**
+ * CryptoKey labels.
+ * @member {Object.} labels
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.labels = $util.emptyObject;
+
+ /**
+ * CryptoKey importOnly.
+ * @member {boolean} importOnly
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.importOnly = false;
+
+ /**
+ * CryptoKey destroyScheduledDuration.
+ * @member {google.protobuf.IDuration|null|undefined} destroyScheduledDuration
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.destroyScheduledDuration = null;
+
+ /**
+ * CryptoKey cryptoKeyBackend.
+ * @member {string} cryptoKeyBackend
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ CryptoKey.prototype.cryptoKeyBackend = "";
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * CryptoKey rotationSchedule.
+ * @member {"rotationPeriod"|undefined} rotationSchedule
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ */
+ Object.defineProperty(CryptoKey.prototype, "rotationSchedule", {
+ get: $util.oneOfGetter($oneOfFields = ["rotationPeriod"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new CryptoKey instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKey=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey instance
+ */
+ CryptoKey.create = function create(properties) {
+ return new CryptoKey(properties);
+ };
+
+ /**
+ * Encodes the specified CryptoKey message. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKey} message CryptoKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKey.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.primary != null && Object.hasOwnProperty.call(message, "primary"))
+ $root.google.cloud.kms.v1.CryptoKeyVersion.encode(message.primary, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.purpose != null && Object.hasOwnProperty.call(message, "purpose"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.purpose);
+ 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.nextRotationTime != null && Object.hasOwnProperty.call(message, "nextRotationTime"))
+ $root.google.protobuf.Timestamp.encode(message.nextRotationTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.rotationPeriod != null && Object.hasOwnProperty.call(message, "rotationPeriod"))
+ $root.google.protobuf.Duration.encode(message.rotationPeriod, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
+ for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
+ if (message.versionTemplate != null && Object.hasOwnProperty.call(message, "versionTemplate"))
+ $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.encode(message.versionTemplate, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.importOnly != null && Object.hasOwnProperty.call(message, "importOnly"))
+ writer.uint32(/* id 13, wireType 0 =*/104).bool(message.importOnly);
+ if (message.destroyScheduledDuration != null && Object.hasOwnProperty.call(message, "destroyScheduledDuration"))
+ $root.google.protobuf.Duration.encode(message.destroyScheduledDuration, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
+ if (message.cryptoKeyBackend != null && Object.hasOwnProperty.call(message, "cryptoKeyBackend"))
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.cryptoKeyBackend);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKey.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKey} message CryptoKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKey.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CryptoKey message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKey.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKey(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.purpose = reader.int32();
+ break;
+ }
+ case 5: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.nextRotationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.rotationPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32());
+ break;
+ }
+ case 11: {
+ message.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.decode(reader, reader.uint32());
+ break;
+ }
+ case 10: {
+ if (message.labels === $util.emptyObject)
+ message.labels = {};
+ var end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ var tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.labels[key] = value;
+ break;
+ }
+ case 13: {
+ message.importOnly = reader.bool();
+ break;
+ }
+ case 14: {
+ message.destroyScheduledDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
+ break;
+ }
+ case 15: {
+ message.cryptoKeyBackend = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CryptoKey message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKey.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CryptoKey message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CryptoKey.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.primary != null && message.hasOwnProperty("primary")) {
+ var error = $root.google.cloud.kms.v1.CryptoKeyVersion.verify(message.primary);
+ if (error)
+ return "primary." + error;
+ }
+ if (message.purpose != null && message.hasOwnProperty("purpose"))
+ switch (message.purpose) {
+ default:
+ return "purpose: enum value expected";
+ case 0:
+ case 1:
+ case 5:
+ case 6:
+ case 9:
+ break;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.nextRotationTime != null && message.hasOwnProperty("nextRotationTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.nextRotationTime);
+ if (error)
+ return "nextRotationTime." + error;
+ }
+ if (message.rotationPeriod != null && message.hasOwnProperty("rotationPeriod")) {
+ properties.rotationSchedule = 1;
+ {
+ var error = $root.google.protobuf.Duration.verify(message.rotationPeriod);
+ if (error)
+ return "rotationPeriod." + error;
+ }
+ }
+ if (message.versionTemplate != null && message.hasOwnProperty("versionTemplate")) {
+ var error = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.verify(message.versionTemplate);
+ if (error)
+ return "versionTemplate." + error;
+ }
+ if (message.labels != null && message.hasOwnProperty("labels")) {
+ if (!$util.isObject(message.labels))
+ return "labels: object expected";
+ var key = Object.keys(message.labels);
+ for (var i = 0; i < key.length; ++i)
+ if (!$util.isString(message.labels[key[i]]))
+ return "labels: string{k:string} expected";
+ }
+ if (message.importOnly != null && message.hasOwnProperty("importOnly"))
+ if (typeof message.importOnly !== "boolean")
+ return "importOnly: boolean expected";
+ if (message.destroyScheduledDuration != null && message.hasOwnProperty("destroyScheduledDuration")) {
+ var error = $root.google.protobuf.Duration.verify(message.destroyScheduledDuration);
+ if (error)
+ return "destroyScheduledDuration." + error;
+ }
+ if (message.cryptoKeyBackend != null && message.hasOwnProperty("cryptoKeyBackend"))
+ if (!$util.isString(message.cryptoKeyBackend))
+ return "cryptoKeyBackend: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CryptoKey} CryptoKey
+ */
+ CryptoKey.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CryptoKey)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CryptoKey();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.primary != null) {
+ if (typeof object.primary !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.primary: object expected");
+ message.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.fromObject(object.primary);
+ }
+ switch (object.purpose) {
+ default:
+ if (typeof object.purpose === "number") {
+ message.purpose = object.purpose;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_PURPOSE_UNSPECIFIED":
+ case 0:
+ message.purpose = 0;
+ break;
+ case "ENCRYPT_DECRYPT":
+ case 1:
+ message.purpose = 1;
+ break;
+ case "ASYMMETRIC_SIGN":
+ case 5:
+ message.purpose = 5;
+ break;
+ case "ASYMMETRIC_DECRYPT":
+ case 6:
+ message.purpose = 6;
+ break;
+ case "MAC":
+ case 9:
+ message.purpose = 9;
+ break;
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.nextRotationTime != null) {
+ if (typeof object.nextRotationTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.nextRotationTime: object expected");
+ message.nextRotationTime = $root.google.protobuf.Timestamp.fromObject(object.nextRotationTime);
+ }
+ if (object.rotationPeriod != null) {
+ if (typeof object.rotationPeriod !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.rotationPeriod: object expected");
+ message.rotationPeriod = $root.google.protobuf.Duration.fromObject(object.rotationPeriod);
+ }
+ if (object.versionTemplate != null) {
+ if (typeof object.versionTemplate !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.versionTemplate: object expected");
+ message.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.fromObject(object.versionTemplate);
+ }
+ if (object.labels) {
+ if (typeof object.labels !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.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.importOnly != null)
+ message.importOnly = Boolean(object.importOnly);
+ if (object.destroyScheduledDuration != null) {
+ if (typeof object.destroyScheduledDuration !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKey.destroyScheduledDuration: object expected");
+ message.destroyScheduledDuration = $root.google.protobuf.Duration.fromObject(object.destroyScheduledDuration);
+ }
+ if (object.cryptoKeyBackend != null)
+ message.cryptoKeyBackend = String(object.cryptoKeyBackend);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CryptoKey message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {google.cloud.kms.v1.CryptoKey} message CryptoKey
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CryptoKey.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.labels = {};
+ if (options.defaults) {
+ object.name = "";
+ object.primary = null;
+ object.purpose = options.enums === String ? "CRYPTO_KEY_PURPOSE_UNSPECIFIED" : 0;
+ object.createTime = null;
+ object.nextRotationTime = null;
+ object.versionTemplate = null;
+ object.importOnly = false;
+ object.destroyScheduledDuration = null;
+ object.cryptoKeyBackend = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.primary != null && message.hasOwnProperty("primary"))
+ object.primary = $root.google.cloud.kms.v1.CryptoKeyVersion.toObject(message.primary, options);
+ if (message.purpose != null && message.hasOwnProperty("purpose"))
+ object.purpose = options.enums === String ? $root.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose[message.purpose] === undefined ? message.purpose : $root.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose[message.purpose] : message.purpose;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.nextRotationTime != null && message.hasOwnProperty("nextRotationTime"))
+ object.nextRotationTime = $root.google.protobuf.Timestamp.toObject(message.nextRotationTime, options);
+ if (message.rotationPeriod != null && message.hasOwnProperty("rotationPeriod")) {
+ object.rotationPeriod = $root.google.protobuf.Duration.toObject(message.rotationPeriod, options);
+ if (options.oneofs)
+ object.rotationSchedule = "rotationPeriod";
+ }
+ var keys2;
+ if (message.labels && (keys2 = Object.keys(message.labels)).length) {
+ object.labels = {};
+ for (var j = 0; j < keys2.length; ++j)
+ object.labels[keys2[j]] = message.labels[keys2[j]];
+ }
+ if (message.versionTemplate != null && message.hasOwnProperty("versionTemplate"))
+ object.versionTemplate = $root.google.cloud.kms.v1.CryptoKeyVersionTemplate.toObject(message.versionTemplate, options);
+ if (message.importOnly != null && message.hasOwnProperty("importOnly"))
+ object.importOnly = message.importOnly;
+ if (message.destroyScheduledDuration != null && message.hasOwnProperty("destroyScheduledDuration"))
+ object.destroyScheduledDuration = $root.google.protobuf.Duration.toObject(message.destroyScheduledDuration, options);
+ if (message.cryptoKeyBackend != null && message.hasOwnProperty("cryptoKeyBackend"))
+ object.cryptoKeyBackend = message.cryptoKeyBackend;
+ return object;
+ };
+
+ /**
+ * Converts this CryptoKey to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CryptoKey.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CryptoKey
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CryptoKey
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKey";
+ };
+
+ /**
+ * CryptoKeyPurpose enum.
+ * @name google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose
+ * @enum {number}
+ * @property {number} CRYPTO_KEY_PURPOSE_UNSPECIFIED=0 CRYPTO_KEY_PURPOSE_UNSPECIFIED value
+ * @property {number} ENCRYPT_DECRYPT=1 ENCRYPT_DECRYPT value
+ * @property {number} ASYMMETRIC_SIGN=5 ASYMMETRIC_SIGN value
+ * @property {number} ASYMMETRIC_DECRYPT=6 ASYMMETRIC_DECRYPT value
+ * @property {number} MAC=9 MAC value
+ */
+ CryptoKey.CryptoKeyPurpose = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CRYPTO_KEY_PURPOSE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "ENCRYPT_DECRYPT"] = 1;
+ values[valuesById[5] = "ASYMMETRIC_SIGN"] = 5;
+ values[valuesById[6] = "ASYMMETRIC_DECRYPT"] = 6;
+ values[valuesById[9] = "MAC"] = 9;
+ return values;
+ })();
+
+ return CryptoKey;
+ })();
+
+ v1.CryptoKeyVersionTemplate = (function() {
+
+ /**
+ * Properties of a CryptoKeyVersionTemplate.
+ * @memberof google.cloud.kms.v1
+ * @interface ICryptoKeyVersionTemplate
+ * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] CryptoKeyVersionTemplate protectionLevel
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] CryptoKeyVersionTemplate algorithm
+ */
+
+ /**
+ * Constructs a new CryptoKeyVersionTemplate.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CryptoKeyVersionTemplate.
+ * @implements ICryptoKeyVersionTemplate
+ * @constructor
+ * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate=} [properties] Properties to set
+ */
+ function CryptoKeyVersionTemplate(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CryptoKeyVersionTemplate protectionLevel.
+ * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @instance
+ */
+ CryptoKeyVersionTemplate.prototype.protectionLevel = 0;
+
+ /**
+ * CryptoKeyVersionTemplate algorithm.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @instance
+ */
+ CryptoKeyVersionTemplate.prototype.algorithm = 0;
+
+ /**
+ * Creates a new CryptoKeyVersionTemplate instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate instance
+ */
+ CryptoKeyVersionTemplate.create = function create(properties) {
+ return new CryptoKeyVersionTemplate(properties);
+ };
+
+ /**
+ * Encodes the specified CryptoKeyVersionTemplate message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate} message CryptoKeyVersionTemplate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKeyVersionTemplate.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.protectionLevel);
+ if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.algorithm);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CryptoKeyVersionTemplate message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersionTemplate.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersionTemplate} message CryptoKeyVersionTemplate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKeyVersionTemplate.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKeyVersionTemplate.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKeyVersionTemplate();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.protectionLevel = reader.int32();
+ break;
+ }
+ case 3: {
+ message.algorithm = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CryptoKeyVersionTemplate message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKeyVersionTemplate.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CryptoKeyVersionTemplate message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CryptoKeyVersionTemplate.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ switch (message.protectionLevel) {
+ default:
+ return "protectionLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ switch (message.algorithm) {
+ default:
+ return "algorithm: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 15:
+ case 5:
+ case 6:
+ case 7:
+ case 16:
+ case 28:
+ case 29:
+ case 30:
+ case 8:
+ case 9:
+ case 10:
+ case 17:
+ case 37:
+ case 38:
+ case 39:
+ case 12:
+ case 13:
+ case 31:
+ case 32:
+ case 18:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CryptoKeyVersionTemplate message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CryptoKeyVersionTemplate} CryptoKeyVersionTemplate
+ */
+ CryptoKeyVersionTemplate.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CryptoKeyVersionTemplate)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CryptoKeyVersionTemplate();
+ switch (object.protectionLevel) {
+ default:
+ if (typeof object.protectionLevel === "number") {
+ message.protectionLevel = object.protectionLevel;
+ break;
+ }
+ break;
+ case "PROTECTION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.protectionLevel = 0;
+ break;
+ case "SOFTWARE":
+ case 1:
+ message.protectionLevel = 1;
+ break;
+ case "HSM":
+ case 2:
+ message.protectionLevel = 2;
+ break;
+ case "EXTERNAL":
+ case 3:
+ message.protectionLevel = 3;
+ break;
+ case "EXTERNAL_VPC":
+ case 4:
+ message.protectionLevel = 4;
+ break;
+ }
+ switch (object.algorithm) {
+ default:
+ if (typeof object.algorithm === "number") {
+ message.algorithm = object.algorithm;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED":
+ case 0:
+ message.algorithm = 0;
+ break;
+ case "GOOGLE_SYMMETRIC_ENCRYPTION":
+ case 1:
+ message.algorithm = 1;
+ break;
+ case "RSA_SIGN_PSS_2048_SHA256":
+ case 2:
+ message.algorithm = 2;
+ break;
+ case "RSA_SIGN_PSS_3072_SHA256":
+ case 3:
+ message.algorithm = 3;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA256":
+ case 4:
+ message.algorithm = 4;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA512":
+ case 15:
+ message.algorithm = 15;
+ break;
+ case "RSA_SIGN_PKCS1_2048_SHA256":
+ case 5:
+ message.algorithm = 5;
+ break;
+ case "RSA_SIGN_PKCS1_3072_SHA256":
+ case 6:
+ message.algorithm = 6;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA256":
+ case 7:
+ message.algorithm = 7;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA512":
+ case 16:
+ message.algorithm = 16;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_2048":
+ case 28:
+ message.algorithm = 28;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_3072":
+ case 29:
+ message.algorithm = 29;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_4096":
+ case 30:
+ message.algorithm = 30;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA256":
+ case 8:
+ message.algorithm = 8;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA256":
+ case 9:
+ message.algorithm = 9;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA256":
+ case 10:
+ message.algorithm = 10;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA512":
+ case 17:
+ message.algorithm = 17;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA1":
+ case 37:
+ message.algorithm = 37;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA1":
+ case 38:
+ message.algorithm = 38;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA1":
+ case 39:
+ message.algorithm = 39;
+ break;
+ case "EC_SIGN_P256_SHA256":
+ case 12:
+ message.algorithm = 12;
+ break;
+ case "EC_SIGN_P384_SHA384":
+ case 13:
+ message.algorithm = 13;
+ break;
+ case "EC_SIGN_SECP256K1_SHA256":
+ case 31:
+ message.algorithm = 31;
+ break;
+ case "HMAC_SHA256":
+ case 32:
+ message.algorithm = 32;
+ break;
+ case "EXTERNAL_SYMMETRIC_ENCRYPTION":
+ case 18:
+ message.algorithm = 18;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CryptoKeyVersionTemplate message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {google.cloud.kms.v1.CryptoKeyVersionTemplate} message CryptoKeyVersionTemplate
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CryptoKeyVersionTemplate.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0;
+ object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0;
+ }
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel;
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm;
+ return object;
+ };
+
+ /**
+ * Converts this CryptoKeyVersionTemplate to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CryptoKeyVersionTemplate.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CryptoKeyVersionTemplate
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CryptoKeyVersionTemplate
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CryptoKeyVersionTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKeyVersionTemplate";
+ };
+
+ return CryptoKeyVersionTemplate;
+ })();
+
+ v1.KeyOperationAttestation = (function() {
+
+ /**
+ * Properties of a KeyOperationAttestation.
+ * @memberof google.cloud.kms.v1
+ * @interface IKeyOperationAttestation
+ * @property {google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat|null} [format] KeyOperationAttestation format
+ * @property {Uint8Array|null} [content] KeyOperationAttestation content
+ * @property {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null} [certChains] KeyOperationAttestation certChains
+ */
+
+ /**
+ * Constructs a new KeyOperationAttestation.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a KeyOperationAttestation.
+ * @implements IKeyOperationAttestation
+ * @constructor
+ * @param {google.cloud.kms.v1.IKeyOperationAttestation=} [properties] Properties to set
+ */
+ function KeyOperationAttestation(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * KeyOperationAttestation format.
+ * @member {google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat} format
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @instance
+ */
+ KeyOperationAttestation.prototype.format = 0;
+
+ /**
+ * KeyOperationAttestation content.
+ * @member {Uint8Array} content
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @instance
+ */
+ KeyOperationAttestation.prototype.content = $util.newBuffer([]);
+
+ /**
+ * KeyOperationAttestation certChains.
+ * @member {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains|null|undefined} certChains
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @instance
+ */
+ KeyOperationAttestation.prototype.certChains = null;
+
+ /**
+ * Creates a new KeyOperationAttestation instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {google.cloud.kms.v1.IKeyOperationAttestation=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation instance
+ */
+ KeyOperationAttestation.create = function create(properties) {
+ return new KeyOperationAttestation(properties);
+ };
+
+ /**
+ * Encodes the specified KeyOperationAttestation message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {google.cloud.kms.v1.IKeyOperationAttestation} message KeyOperationAttestation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ KeyOperationAttestation.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.format != null && Object.hasOwnProperty.call(message, "format"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.format);
+ if (message.content != null && Object.hasOwnProperty.call(message, "content"))
+ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.content);
+ if (message.certChains != null && Object.hasOwnProperty.call(message, "certChains"))
+ $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.encode(message.certChains, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified KeyOperationAttestation message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {google.cloud.kms.v1.IKeyOperationAttestation} message KeyOperationAttestation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ KeyOperationAttestation.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a KeyOperationAttestation message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ KeyOperationAttestation.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyOperationAttestation();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 4: {
+ message.format = reader.int32();
+ break;
+ }
+ case 5: {
+ message.content = reader.bytes();
+ break;
+ }
+ case 6: {
+ message.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a KeyOperationAttestation message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ KeyOperationAttestation.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a KeyOperationAttestation message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ KeyOperationAttestation.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.format != null && message.hasOwnProperty("format"))
+ switch (message.format) {
+ default:
+ return "format: enum value expected";
+ case 0:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.content != null && message.hasOwnProperty("content"))
+ if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
+ return "content: buffer expected";
+ if (message.certChains != null && message.hasOwnProperty("certChains")) {
+ var error = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify(message.certChains);
+ if (error)
+ return "certChains." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a KeyOperationAttestation message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation} KeyOperationAttestation
+ */
+ KeyOperationAttestation.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.KeyOperationAttestation)
+ return object;
+ var message = new $root.google.cloud.kms.v1.KeyOperationAttestation();
+ switch (object.format) {
+ default:
+ if (typeof object.format === "number") {
+ message.format = object.format;
+ break;
+ }
+ break;
+ case "ATTESTATION_FORMAT_UNSPECIFIED":
+ case 0:
+ message.format = 0;
+ break;
+ case "CAVIUM_V1_COMPRESSED":
+ case 3:
+ message.format = 3;
+ break;
+ case "CAVIUM_V2_COMPRESSED":
+ case 4:
+ message.format = 4;
+ break;
+ }
+ if (object.content != null)
+ if (typeof object.content === "string")
+ $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
+ else if (object.content.length >= 0)
+ message.content = object.content;
+ if (object.certChains != null) {
+ if (typeof object.certChains !== "object")
+ throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.certChains: object expected");
+ message.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.fromObject(object.certChains);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a KeyOperationAttestation message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {google.cloud.kms.v1.KeyOperationAttestation} message KeyOperationAttestation
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ KeyOperationAttestation.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.format = options.enums === String ? "ATTESTATION_FORMAT_UNSPECIFIED" : 0;
+ if (options.bytes === String)
+ object.content = "";
+ else {
+ object.content = [];
+ if (options.bytes !== Array)
+ object.content = $util.newBuffer(object.content);
+ }
+ object.certChains = null;
+ }
+ if (message.format != null && message.hasOwnProperty("format"))
+ object.format = options.enums === String ? $root.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat[message.format] === undefined ? message.format : $root.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat[message.format] : message.format;
+ if (message.content != null && message.hasOwnProperty("content"))
+ object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
+ if (message.certChains != null && message.hasOwnProperty("certChains"))
+ object.certChains = $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.toObject(message.certChains, options);
+ return object;
+ };
+
+ /**
+ * Converts this KeyOperationAttestation to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ KeyOperationAttestation.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for KeyOperationAttestation
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ KeyOperationAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.KeyOperationAttestation";
+ };
+
+ /**
+ * AttestationFormat enum.
+ * @name google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat
+ * @enum {number}
+ * @property {number} ATTESTATION_FORMAT_UNSPECIFIED=0 ATTESTATION_FORMAT_UNSPECIFIED value
+ * @property {number} CAVIUM_V1_COMPRESSED=3 CAVIUM_V1_COMPRESSED value
+ * @property {number} CAVIUM_V2_COMPRESSED=4 CAVIUM_V2_COMPRESSED value
+ */
+ KeyOperationAttestation.AttestationFormat = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "ATTESTATION_FORMAT_UNSPECIFIED"] = 0;
+ values[valuesById[3] = "CAVIUM_V1_COMPRESSED"] = 3;
+ values[valuesById[4] = "CAVIUM_V2_COMPRESSED"] = 4;
+ return values;
+ })();
+
+ KeyOperationAttestation.CertificateChains = (function() {
+
+ /**
+ * Properties of a CertificateChains.
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @interface ICertificateChains
+ * @property {Array.|null} [caviumCerts] CertificateChains caviumCerts
+ * @property {Array.|null} [googleCardCerts] CertificateChains googleCardCerts
+ * @property {Array.|null} [googlePartitionCerts] CertificateChains googlePartitionCerts
+ */
+
+ /**
+ * Constructs a new CertificateChains.
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation
+ * @classdesc Represents a CertificateChains.
+ * @implements ICertificateChains
+ * @constructor
+ * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains=} [properties] Properties to set
+ */
+ function CertificateChains(properties) {
+ this.caviumCerts = [];
+ this.googleCardCerts = [];
+ this.googlePartitionCerts = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CertificateChains caviumCerts.
+ * @member {Array.} caviumCerts
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @instance
+ */
+ CertificateChains.prototype.caviumCerts = $util.emptyArray;
+
+ /**
+ * CertificateChains googleCardCerts.
+ * @member {Array.} googleCardCerts
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @instance
+ */
+ CertificateChains.prototype.googleCardCerts = $util.emptyArray;
+
+ /**
+ * CertificateChains googlePartitionCerts.
+ * @member {Array.} googlePartitionCerts
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @instance
+ */
+ CertificateChains.prototype.googlePartitionCerts = $util.emptyArray;
+
+ /**
+ * Creates a new CertificateChains instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains instance
+ */
+ CertificateChains.create = function create(properties) {
+ return new CertificateChains(properties);
+ };
+
+ /**
+ * Encodes the specified CertificateChains message. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains} message CertificateChains message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CertificateChains.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.caviumCerts != null && message.caviumCerts.length)
+ for (var i = 0; i < message.caviumCerts.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.caviumCerts[i]);
+ if (message.googleCardCerts != null && message.googleCardCerts.length)
+ for (var i = 0; i < message.googleCardCerts.length; ++i)
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.googleCardCerts[i]);
+ if (message.googlePartitionCerts != null && message.googlePartitionCerts.length)
+ for (var i = 0; i < message.googlePartitionCerts.length; ++i)
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.googlePartitionCerts[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CertificateChains message, length delimited. Does not implicitly {@link google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {google.cloud.kms.v1.KeyOperationAttestation.ICertificateChains} message CertificateChains message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CertificateChains.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CertificateChains message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CertificateChains.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.caviumCerts && message.caviumCerts.length))
+ message.caviumCerts = [];
+ message.caviumCerts.push(reader.string());
+ break;
+ }
+ case 2: {
+ if (!(message.googleCardCerts && message.googleCardCerts.length))
+ message.googleCardCerts = [];
+ message.googleCardCerts.push(reader.string());
+ break;
+ }
+ case 3: {
+ if (!(message.googlePartitionCerts && message.googlePartitionCerts.length))
+ message.googlePartitionCerts = [];
+ message.googlePartitionCerts.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CertificateChains message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CertificateChains.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CertificateChains message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CertificateChains.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.caviumCerts != null && message.hasOwnProperty("caviumCerts")) {
+ if (!Array.isArray(message.caviumCerts))
+ return "caviumCerts: array expected";
+ for (var i = 0; i < message.caviumCerts.length; ++i)
+ if (!$util.isString(message.caviumCerts[i]))
+ return "caviumCerts: string[] expected";
+ }
+ if (message.googleCardCerts != null && message.hasOwnProperty("googleCardCerts")) {
+ if (!Array.isArray(message.googleCardCerts))
+ return "googleCardCerts: array expected";
+ for (var i = 0; i < message.googleCardCerts.length; ++i)
+ if (!$util.isString(message.googleCardCerts[i]))
+ return "googleCardCerts: string[] expected";
+ }
+ if (message.googlePartitionCerts != null && message.hasOwnProperty("googlePartitionCerts")) {
+ if (!Array.isArray(message.googlePartitionCerts))
+ return "googlePartitionCerts: array expected";
+ for (var i = 0; i < message.googlePartitionCerts.length; ++i)
+ if (!$util.isString(message.googlePartitionCerts[i]))
+ return "googlePartitionCerts: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CertificateChains message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} CertificateChains
+ */
+ CertificateChains.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains)
+ return object;
+ var message = new $root.google.cloud.kms.v1.KeyOperationAttestation.CertificateChains();
+ if (object.caviumCerts) {
+ if (!Array.isArray(object.caviumCerts))
+ throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.caviumCerts: array expected");
+ message.caviumCerts = [];
+ for (var i = 0; i < object.caviumCerts.length; ++i)
+ message.caviumCerts[i] = String(object.caviumCerts[i]);
+ }
+ if (object.googleCardCerts) {
+ if (!Array.isArray(object.googleCardCerts))
+ throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.googleCardCerts: array expected");
+ message.googleCardCerts = [];
+ for (var i = 0; i < object.googleCardCerts.length; ++i)
+ message.googleCardCerts[i] = String(object.googleCardCerts[i]);
+ }
+ if (object.googlePartitionCerts) {
+ if (!Array.isArray(object.googlePartitionCerts))
+ throw TypeError(".google.cloud.kms.v1.KeyOperationAttestation.CertificateChains.googlePartitionCerts: array expected");
+ message.googlePartitionCerts = [];
+ for (var i = 0; i < object.googlePartitionCerts.length; ++i)
+ message.googlePartitionCerts[i] = String(object.googlePartitionCerts[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CertificateChains message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {google.cloud.kms.v1.KeyOperationAttestation.CertificateChains} message CertificateChains
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CertificateChains.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.caviumCerts = [];
+ object.googleCardCerts = [];
+ object.googlePartitionCerts = [];
+ }
+ if (message.caviumCerts && message.caviumCerts.length) {
+ object.caviumCerts = [];
+ for (var j = 0; j < message.caviumCerts.length; ++j)
+ object.caviumCerts[j] = message.caviumCerts[j];
+ }
+ if (message.googleCardCerts && message.googleCardCerts.length) {
+ object.googleCardCerts = [];
+ for (var j = 0; j < message.googleCardCerts.length; ++j)
+ object.googleCardCerts[j] = message.googleCardCerts[j];
+ }
+ if (message.googlePartitionCerts && message.googlePartitionCerts.length) {
+ object.googlePartitionCerts = [];
+ for (var j = 0; j < message.googlePartitionCerts.length; ++j)
+ object.googlePartitionCerts[j] = message.googlePartitionCerts[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this CertificateChains to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CertificateChains.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CertificateChains
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.KeyOperationAttestation.CertificateChains
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CertificateChains.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.KeyOperationAttestation.CertificateChains";
+ };
+
+ return CertificateChains;
+ })();
+
+ return KeyOperationAttestation;
+ })();
+
+ v1.CryptoKeyVersion = (function() {
+
+ /**
+ * Properties of a CryptoKeyVersion.
+ * @memberof google.cloud.kms.v1
+ * @interface ICryptoKeyVersion
+ * @property {string|null} [name] CryptoKeyVersion name
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState|null} [state] CryptoKeyVersion state
+ * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] CryptoKeyVersion protectionLevel
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] CryptoKeyVersion algorithm
+ * @property {google.cloud.kms.v1.IKeyOperationAttestation|null} [attestation] CryptoKeyVersion attestation
+ * @property {google.protobuf.ITimestamp|null} [createTime] CryptoKeyVersion createTime
+ * @property {google.protobuf.ITimestamp|null} [generateTime] CryptoKeyVersion generateTime
+ * @property {google.protobuf.ITimestamp|null} [destroyTime] CryptoKeyVersion destroyTime
+ * @property {google.protobuf.ITimestamp|null} [destroyEventTime] CryptoKeyVersion destroyEventTime
+ * @property {string|null} [importJob] CryptoKeyVersion importJob
+ * @property {google.protobuf.ITimestamp|null} [importTime] CryptoKeyVersion importTime
+ * @property {string|null} [importFailureReason] CryptoKeyVersion importFailureReason
+ * @property {google.cloud.kms.v1.IExternalProtectionLevelOptions|null} [externalProtectionLevelOptions] CryptoKeyVersion externalProtectionLevelOptions
+ * @property {boolean|null} [reimportEligible] CryptoKeyVersion reimportEligible
+ */
+
+ /**
+ * Constructs a new CryptoKeyVersion.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CryptoKeyVersion.
+ * @implements ICryptoKeyVersion
+ * @constructor
+ * @param {google.cloud.kms.v1.ICryptoKeyVersion=} [properties] Properties to set
+ */
+ function CryptoKeyVersion(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CryptoKeyVersion name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.name = "";
+
+ /**
+ * CryptoKeyVersion state.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState} state
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.state = 0;
+
+ /**
+ * CryptoKeyVersion protectionLevel.
+ * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.protectionLevel = 0;
+
+ /**
+ * CryptoKeyVersion algorithm.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.algorithm = 0;
+
+ /**
+ * CryptoKeyVersion attestation.
+ * @member {google.cloud.kms.v1.IKeyOperationAttestation|null|undefined} attestation
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.attestation = null;
+
+ /**
+ * CryptoKeyVersion createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.createTime = null;
+
+ /**
+ * CryptoKeyVersion generateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} generateTime
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.generateTime = null;
+
+ /**
+ * CryptoKeyVersion destroyTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} destroyTime
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.destroyTime = null;
+
+ /**
+ * CryptoKeyVersion destroyEventTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} destroyEventTime
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.destroyEventTime = null;
+
+ /**
+ * CryptoKeyVersion importJob.
+ * @member {string} importJob
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.importJob = "";
+
+ /**
+ * CryptoKeyVersion importTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} importTime
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.importTime = null;
+
+ /**
+ * CryptoKeyVersion importFailureReason.
+ * @member {string} importFailureReason
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.importFailureReason = "";
+
+ /**
+ * CryptoKeyVersion externalProtectionLevelOptions.
+ * @member {google.cloud.kms.v1.IExternalProtectionLevelOptions|null|undefined} externalProtectionLevelOptions
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.externalProtectionLevelOptions = null;
+
+ /**
+ * CryptoKeyVersion reimportEligible.
+ * @member {boolean} reimportEligible
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ */
+ CryptoKeyVersion.prototype.reimportEligible = false;
+
+ /**
+ * Creates a new CryptoKeyVersion instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersion=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion instance
+ */
+ CryptoKeyVersion.create = function create(properties) {
+ return new CryptoKeyVersion(properties);
+ };
+
+ /**
+ * Encodes the specified CryptoKeyVersion message. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersion} message CryptoKeyVersion message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKeyVersion.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.state != null && Object.hasOwnProperty.call(message, "state"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.destroyTime != null && Object.hasOwnProperty.call(message, "destroyTime"))
+ $root.google.protobuf.Timestamp.encode(message.destroyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.destroyEventTime != null && Object.hasOwnProperty.call(message, "destroyEventTime"))
+ $root.google.protobuf.Timestamp.encode(message.destroyEventTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel"))
+ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.protectionLevel);
+ if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation"))
+ $root.google.cloud.kms.v1.KeyOperationAttestation.encode(message.attestation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm"))
+ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.algorithm);
+ if (message.generateTime != null && Object.hasOwnProperty.call(message, "generateTime"))
+ $root.google.protobuf.Timestamp.encode(message.generateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.importJob != null && Object.hasOwnProperty.call(message, "importJob"))
+ writer.uint32(/* id 14, wireType 2 =*/114).string(message.importJob);
+ if (message.importTime != null && Object.hasOwnProperty.call(message, "importTime"))
+ $root.google.protobuf.Timestamp.encode(message.importTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
+ if (message.importFailureReason != null && Object.hasOwnProperty.call(message, "importFailureReason"))
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.importFailureReason);
+ if (message.externalProtectionLevelOptions != null && Object.hasOwnProperty.call(message, "externalProtectionLevelOptions"))
+ $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.encode(message.externalProtectionLevelOptions, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
+ if (message.reimportEligible != null && Object.hasOwnProperty.call(message, "reimportEligible"))
+ writer.uint32(/* id 18, wireType 0 =*/144).bool(message.reimportEligible);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CryptoKeyVersion message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CryptoKeyVersion.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {google.cloud.kms.v1.ICryptoKeyVersion} message CryptoKeyVersion message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoKeyVersion.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CryptoKeyVersion message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKeyVersion.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CryptoKeyVersion();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 3: {
+ message.state = reader.int32();
+ break;
+ }
+ case 7: {
+ message.protectionLevel = reader.int32();
+ break;
+ }
+ case 10: {
+ message.algorithm = reader.int32();
+ break;
+ }
+ case 8: {
+ message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 11: {
+ message.generateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.destroyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.destroyEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 14: {
+ message.importJob = reader.string();
+ break;
+ }
+ case 15: {
+ message.importTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 16: {
+ message.importFailureReason = reader.string();
+ break;
+ }
+ case 17: {
+ message.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 18: {
+ message.reimportEligible = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CryptoKeyVersion message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoKeyVersion.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CryptoKeyVersion message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CryptoKeyVersion.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.state != null && message.hasOwnProperty("state"))
+ switch (message.state) {
+ default:
+ return "state: enum value expected";
+ case 0:
+ case 5:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 6:
+ case 7:
+ break;
+ }
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ switch (message.protectionLevel) {
+ default:
+ return "protectionLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ switch (message.algorithm) {
+ default:
+ return "algorithm: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 15:
+ case 5:
+ case 6:
+ case 7:
+ case 16:
+ case 28:
+ case 29:
+ case 30:
+ case 8:
+ case 9:
+ case 10:
+ case 17:
+ case 37:
+ case 38:
+ case 39:
+ case 12:
+ case 13:
+ case 31:
+ case 32:
+ case 18:
+ break;
+ }
+ if (message.attestation != null && message.hasOwnProperty("attestation")) {
+ var error = $root.google.cloud.kms.v1.KeyOperationAttestation.verify(message.attestation);
+ if (error)
+ return "attestation." + error;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.generateTime != null && message.hasOwnProperty("generateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.generateTime);
+ if (error)
+ return "generateTime." + error;
+ }
+ if (message.destroyTime != null && message.hasOwnProperty("destroyTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.destroyTime);
+ if (error)
+ return "destroyTime." + error;
+ }
+ if (message.destroyEventTime != null && message.hasOwnProperty("destroyEventTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.destroyEventTime);
+ if (error)
+ return "destroyEventTime." + error;
+ }
+ if (message.importJob != null && message.hasOwnProperty("importJob"))
+ if (!$util.isString(message.importJob))
+ return "importJob: string expected";
+ if (message.importTime != null && message.hasOwnProperty("importTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.importTime);
+ if (error)
+ return "importTime." + error;
+ }
+ if (message.importFailureReason != null && message.hasOwnProperty("importFailureReason"))
+ if (!$util.isString(message.importFailureReason))
+ return "importFailureReason: string expected";
+ if (message.externalProtectionLevelOptions != null && message.hasOwnProperty("externalProtectionLevelOptions")) {
+ var error = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.verify(message.externalProtectionLevelOptions);
+ if (error)
+ return "externalProtectionLevelOptions." + error;
+ }
+ if (message.reimportEligible != null && message.hasOwnProperty("reimportEligible"))
+ if (typeof message.reimportEligible !== "boolean")
+ return "reimportEligible: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a CryptoKeyVersion message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CryptoKeyVersion} CryptoKeyVersion
+ */
+ CryptoKeyVersion.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CryptoKeyVersion)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CryptoKeyVersion();
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.state) {
+ default:
+ if (typeof object.state === "number") {
+ message.state = object.state;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED":
+ case 0:
+ message.state = 0;
+ break;
+ case "PENDING_GENERATION":
+ case 5:
+ message.state = 5;
+ break;
+ case "ENABLED":
+ case 1:
+ message.state = 1;
+ break;
+ case "DISABLED":
+ case 2:
+ message.state = 2;
+ break;
+ case "DESTROYED":
+ case 3:
+ message.state = 3;
+ break;
+ case "DESTROY_SCHEDULED":
+ case 4:
+ message.state = 4;
+ break;
+ case "PENDING_IMPORT":
+ case 6:
+ message.state = 6;
+ break;
+ case "IMPORT_FAILED":
+ case 7:
+ message.state = 7;
+ break;
+ }
+ switch (object.protectionLevel) {
+ default:
+ if (typeof object.protectionLevel === "number") {
+ message.protectionLevel = object.protectionLevel;
+ break;
+ }
+ break;
+ case "PROTECTION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.protectionLevel = 0;
+ break;
+ case "SOFTWARE":
+ case 1:
+ message.protectionLevel = 1;
+ break;
+ case "HSM":
+ case 2:
+ message.protectionLevel = 2;
+ break;
+ case "EXTERNAL":
+ case 3:
+ message.protectionLevel = 3;
+ break;
+ case "EXTERNAL_VPC":
+ case 4:
+ message.protectionLevel = 4;
+ break;
+ }
+ switch (object.algorithm) {
+ default:
+ if (typeof object.algorithm === "number") {
+ message.algorithm = object.algorithm;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED":
+ case 0:
+ message.algorithm = 0;
+ break;
+ case "GOOGLE_SYMMETRIC_ENCRYPTION":
+ case 1:
+ message.algorithm = 1;
+ break;
+ case "RSA_SIGN_PSS_2048_SHA256":
+ case 2:
+ message.algorithm = 2;
+ break;
+ case "RSA_SIGN_PSS_3072_SHA256":
+ case 3:
+ message.algorithm = 3;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA256":
+ case 4:
+ message.algorithm = 4;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA512":
+ case 15:
+ message.algorithm = 15;
+ break;
+ case "RSA_SIGN_PKCS1_2048_SHA256":
+ case 5:
+ message.algorithm = 5;
+ break;
+ case "RSA_SIGN_PKCS1_3072_SHA256":
+ case 6:
+ message.algorithm = 6;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA256":
+ case 7:
+ message.algorithm = 7;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA512":
+ case 16:
+ message.algorithm = 16;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_2048":
+ case 28:
+ message.algorithm = 28;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_3072":
+ case 29:
+ message.algorithm = 29;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_4096":
+ case 30:
+ message.algorithm = 30;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA256":
+ case 8:
+ message.algorithm = 8;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA256":
+ case 9:
+ message.algorithm = 9;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA256":
+ case 10:
+ message.algorithm = 10;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA512":
+ case 17:
+ message.algorithm = 17;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA1":
+ case 37:
+ message.algorithm = 37;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA1":
+ case 38:
+ message.algorithm = 38;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA1":
+ case 39:
+ message.algorithm = 39;
+ break;
+ case "EC_SIGN_P256_SHA256":
+ case 12:
+ message.algorithm = 12;
+ break;
+ case "EC_SIGN_P384_SHA384":
+ case 13:
+ message.algorithm = 13;
+ break;
+ case "EC_SIGN_SECP256K1_SHA256":
+ case 31:
+ message.algorithm = 31;
+ break;
+ case "HMAC_SHA256":
+ case 32:
+ message.algorithm = 32;
+ break;
+ case "EXTERNAL_SYMMETRIC_ENCRYPTION":
+ case 18:
+ message.algorithm = 18;
+ break;
+ }
+ if (object.attestation != null) {
+ if (typeof object.attestation !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.attestation: object expected");
+ message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.fromObject(object.attestation);
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.generateTime != null) {
+ if (typeof object.generateTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.generateTime: object expected");
+ message.generateTime = $root.google.protobuf.Timestamp.fromObject(object.generateTime);
+ }
+ if (object.destroyTime != null) {
+ if (typeof object.destroyTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.destroyTime: object expected");
+ message.destroyTime = $root.google.protobuf.Timestamp.fromObject(object.destroyTime);
+ }
+ if (object.destroyEventTime != null) {
+ if (typeof object.destroyEventTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.destroyEventTime: object expected");
+ message.destroyEventTime = $root.google.protobuf.Timestamp.fromObject(object.destroyEventTime);
+ }
+ if (object.importJob != null)
+ message.importJob = String(object.importJob);
+ if (object.importTime != null) {
+ if (typeof object.importTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.importTime: object expected");
+ message.importTime = $root.google.protobuf.Timestamp.fromObject(object.importTime);
+ }
+ if (object.importFailureReason != null)
+ message.importFailureReason = String(object.importFailureReason);
+ if (object.externalProtectionLevelOptions != null) {
+ if (typeof object.externalProtectionLevelOptions !== "object")
+ throw TypeError(".google.cloud.kms.v1.CryptoKeyVersion.externalProtectionLevelOptions: object expected");
+ message.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.fromObject(object.externalProtectionLevelOptions);
+ }
+ if (object.reimportEligible != null)
+ message.reimportEligible = Boolean(object.reimportEligible);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CryptoKeyVersion message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} message CryptoKeyVersion
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CryptoKeyVersion.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.state = options.enums === String ? "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED" : 0;
+ object.createTime = null;
+ object.destroyTime = null;
+ object.destroyEventTime = null;
+ object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0;
+ object.attestation = null;
+ object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0;
+ object.generateTime = null;
+ object.importJob = "";
+ object.importTime = null;
+ object.importFailureReason = "";
+ object.externalProtectionLevelOptions = null;
+ object.reimportEligible = false;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.state != null && message.hasOwnProperty("state"))
+ object.state = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState[message.state] === undefined ? message.state : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState[message.state] : message.state;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.destroyTime != null && message.hasOwnProperty("destroyTime"))
+ object.destroyTime = $root.google.protobuf.Timestamp.toObject(message.destroyTime, options);
+ if (message.destroyEventTime != null && message.hasOwnProperty("destroyEventTime"))
+ object.destroyEventTime = $root.google.protobuf.Timestamp.toObject(message.destroyEventTime, options);
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel;
+ if (message.attestation != null && message.hasOwnProperty("attestation"))
+ object.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.toObject(message.attestation, options);
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm;
+ if (message.generateTime != null && message.hasOwnProperty("generateTime"))
+ object.generateTime = $root.google.protobuf.Timestamp.toObject(message.generateTime, options);
+ if (message.importJob != null && message.hasOwnProperty("importJob"))
+ object.importJob = message.importJob;
+ if (message.importTime != null && message.hasOwnProperty("importTime"))
+ object.importTime = $root.google.protobuf.Timestamp.toObject(message.importTime, options);
+ if (message.importFailureReason != null && message.hasOwnProperty("importFailureReason"))
+ object.importFailureReason = message.importFailureReason;
+ if (message.externalProtectionLevelOptions != null && message.hasOwnProperty("externalProtectionLevelOptions"))
+ object.externalProtectionLevelOptions = $root.google.cloud.kms.v1.ExternalProtectionLevelOptions.toObject(message.externalProtectionLevelOptions, options);
+ if (message.reimportEligible != null && message.hasOwnProperty("reimportEligible"))
+ object.reimportEligible = message.reimportEligible;
+ return object;
+ };
+
+ /**
+ * Converts this CryptoKeyVersion to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CryptoKeyVersion.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CryptoKeyVersion
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CryptoKeyVersion
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CryptoKeyVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CryptoKeyVersion";
+ };
+
+ /**
+ * CryptoKeyVersionAlgorithm enum.
+ * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm
+ * @enum {number}
+ * @property {number} CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED=0 CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED value
+ * @property {number} GOOGLE_SYMMETRIC_ENCRYPTION=1 GOOGLE_SYMMETRIC_ENCRYPTION value
+ * @property {number} RSA_SIGN_PSS_2048_SHA256=2 RSA_SIGN_PSS_2048_SHA256 value
+ * @property {number} RSA_SIGN_PSS_3072_SHA256=3 RSA_SIGN_PSS_3072_SHA256 value
+ * @property {number} RSA_SIGN_PSS_4096_SHA256=4 RSA_SIGN_PSS_4096_SHA256 value
+ * @property {number} RSA_SIGN_PSS_4096_SHA512=15 RSA_SIGN_PSS_4096_SHA512 value
+ * @property {number} RSA_SIGN_PKCS1_2048_SHA256=5 RSA_SIGN_PKCS1_2048_SHA256 value
+ * @property {number} RSA_SIGN_PKCS1_3072_SHA256=6 RSA_SIGN_PKCS1_3072_SHA256 value
+ * @property {number} RSA_SIGN_PKCS1_4096_SHA256=7 RSA_SIGN_PKCS1_4096_SHA256 value
+ * @property {number} RSA_SIGN_PKCS1_4096_SHA512=16 RSA_SIGN_PKCS1_4096_SHA512 value
+ * @property {number} RSA_SIGN_RAW_PKCS1_2048=28 RSA_SIGN_RAW_PKCS1_2048 value
+ * @property {number} RSA_SIGN_RAW_PKCS1_3072=29 RSA_SIGN_RAW_PKCS1_3072 value
+ * @property {number} RSA_SIGN_RAW_PKCS1_4096=30 RSA_SIGN_RAW_PKCS1_4096 value
+ * @property {number} RSA_DECRYPT_OAEP_2048_SHA256=8 RSA_DECRYPT_OAEP_2048_SHA256 value
+ * @property {number} RSA_DECRYPT_OAEP_3072_SHA256=9 RSA_DECRYPT_OAEP_3072_SHA256 value
+ * @property {number} RSA_DECRYPT_OAEP_4096_SHA256=10 RSA_DECRYPT_OAEP_4096_SHA256 value
+ * @property {number} RSA_DECRYPT_OAEP_4096_SHA512=17 RSA_DECRYPT_OAEP_4096_SHA512 value
+ * @property {number} RSA_DECRYPT_OAEP_2048_SHA1=37 RSA_DECRYPT_OAEP_2048_SHA1 value
+ * @property {number} RSA_DECRYPT_OAEP_3072_SHA1=38 RSA_DECRYPT_OAEP_3072_SHA1 value
+ * @property {number} RSA_DECRYPT_OAEP_4096_SHA1=39 RSA_DECRYPT_OAEP_4096_SHA1 value
+ * @property {number} EC_SIGN_P256_SHA256=12 EC_SIGN_P256_SHA256 value
+ * @property {number} EC_SIGN_P384_SHA384=13 EC_SIGN_P384_SHA384 value
+ * @property {number} EC_SIGN_SECP256K1_SHA256=31 EC_SIGN_SECP256K1_SHA256 value
+ * @property {number} HMAC_SHA256=32 HMAC_SHA256 value
+ * @property {number} EXTERNAL_SYMMETRIC_ENCRYPTION=18 EXTERNAL_SYMMETRIC_ENCRYPTION value
+ */
+ CryptoKeyVersion.CryptoKeyVersionAlgorithm = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "GOOGLE_SYMMETRIC_ENCRYPTION"] = 1;
+ values[valuesById[2] = "RSA_SIGN_PSS_2048_SHA256"] = 2;
+ values[valuesById[3] = "RSA_SIGN_PSS_3072_SHA256"] = 3;
+ values[valuesById[4] = "RSA_SIGN_PSS_4096_SHA256"] = 4;
+ values[valuesById[15] = "RSA_SIGN_PSS_4096_SHA512"] = 15;
+ values[valuesById[5] = "RSA_SIGN_PKCS1_2048_SHA256"] = 5;
+ values[valuesById[6] = "RSA_SIGN_PKCS1_3072_SHA256"] = 6;
+ values[valuesById[7] = "RSA_SIGN_PKCS1_4096_SHA256"] = 7;
+ values[valuesById[16] = "RSA_SIGN_PKCS1_4096_SHA512"] = 16;
+ values[valuesById[28] = "RSA_SIGN_RAW_PKCS1_2048"] = 28;
+ values[valuesById[29] = "RSA_SIGN_RAW_PKCS1_3072"] = 29;
+ values[valuesById[30] = "RSA_SIGN_RAW_PKCS1_4096"] = 30;
+ values[valuesById[8] = "RSA_DECRYPT_OAEP_2048_SHA256"] = 8;
+ values[valuesById[9] = "RSA_DECRYPT_OAEP_3072_SHA256"] = 9;
+ values[valuesById[10] = "RSA_DECRYPT_OAEP_4096_SHA256"] = 10;
+ values[valuesById[17] = "RSA_DECRYPT_OAEP_4096_SHA512"] = 17;
+ values[valuesById[37] = "RSA_DECRYPT_OAEP_2048_SHA1"] = 37;
+ values[valuesById[38] = "RSA_DECRYPT_OAEP_3072_SHA1"] = 38;
+ values[valuesById[39] = "RSA_DECRYPT_OAEP_4096_SHA1"] = 39;
+ values[valuesById[12] = "EC_SIGN_P256_SHA256"] = 12;
+ values[valuesById[13] = "EC_SIGN_P384_SHA384"] = 13;
+ values[valuesById[31] = "EC_SIGN_SECP256K1_SHA256"] = 31;
+ values[valuesById[32] = "HMAC_SHA256"] = 32;
+ values[valuesById[18] = "EXTERNAL_SYMMETRIC_ENCRYPTION"] = 18;
+ return values;
+ })();
+
+ /**
+ * CryptoKeyVersionState enum.
+ * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState
+ * @enum {number}
+ * @property {number} CRYPTO_KEY_VERSION_STATE_UNSPECIFIED=0 CRYPTO_KEY_VERSION_STATE_UNSPECIFIED value
+ * @property {number} PENDING_GENERATION=5 PENDING_GENERATION value
+ * @property {number} ENABLED=1 ENABLED value
+ * @property {number} DISABLED=2 DISABLED value
+ * @property {number} DESTROYED=3 DESTROYED value
+ * @property {number} DESTROY_SCHEDULED=4 DESTROY_SCHEDULED value
+ * @property {number} PENDING_IMPORT=6 PENDING_IMPORT value
+ * @property {number} IMPORT_FAILED=7 IMPORT_FAILED value
+ */
+ CryptoKeyVersion.CryptoKeyVersionState = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED"] = 0;
+ values[valuesById[5] = "PENDING_GENERATION"] = 5;
+ values[valuesById[1] = "ENABLED"] = 1;
+ values[valuesById[2] = "DISABLED"] = 2;
+ values[valuesById[3] = "DESTROYED"] = 3;
+ values[valuesById[4] = "DESTROY_SCHEDULED"] = 4;
+ values[valuesById[6] = "PENDING_IMPORT"] = 6;
+ values[valuesById[7] = "IMPORT_FAILED"] = 7;
+ return values;
+ })();
+
+ /**
+ * CryptoKeyVersionView enum.
+ * @name google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView
+ * @enum {number}
+ * @property {number} CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED=0 CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED value
+ * @property {number} FULL=1 FULL value
+ */
+ CryptoKeyVersion.CryptoKeyVersionView = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "FULL"] = 1;
+ return values;
+ })();
+
+ return CryptoKeyVersion;
+ })();
+
+ v1.PublicKey = (function() {
+
+ /**
+ * Properties of a PublicKey.
+ * @memberof google.cloud.kms.v1
+ * @interface IPublicKey
+ * @property {string|null} [pem] PublicKey pem
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] PublicKey algorithm
+ * @property {google.protobuf.IInt64Value|null} [pemCrc32c] PublicKey pemCrc32c
+ * @property {string|null} [name] PublicKey name
+ * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] PublicKey protectionLevel
+ */
+
+ /**
+ * Constructs a new PublicKey.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a PublicKey.
+ * @implements IPublicKey
+ * @constructor
+ * @param {google.cloud.kms.v1.IPublicKey=} [properties] Properties to set
+ */
+ function PublicKey(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PublicKey pem.
+ * @member {string} pem
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ */
+ PublicKey.prototype.pem = "";
+
+ /**
+ * PublicKey algorithm.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ */
+ PublicKey.prototype.algorithm = 0;
+
+ /**
+ * PublicKey pemCrc32c.
+ * @member {google.protobuf.IInt64Value|null|undefined} pemCrc32c
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ */
+ PublicKey.prototype.pemCrc32c = null;
+
+ /**
+ * PublicKey name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ */
+ PublicKey.prototype.name = "";
+
+ /**
+ * PublicKey protectionLevel.
+ * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ */
+ PublicKey.prototype.protectionLevel = 0;
+
+ /**
+ * Creates a new PublicKey instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {google.cloud.kms.v1.IPublicKey=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.PublicKey} PublicKey instance
+ */
+ PublicKey.create = function create(properties) {
+ return new PublicKey(properties);
+ };
+
+ /**
+ * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {google.cloud.kms.v1.IPublicKey} message PublicKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PublicKey.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pem != null && Object.hasOwnProperty.call(message, "pem"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.pem);
+ if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm);
+ if (message.pemCrc32c != null && Object.hasOwnProperty.call(message, "pemCrc32c"))
+ $root.google.protobuf.Int64Value.encode(message.pemCrc32c, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
+ if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protectionLevel);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.PublicKey.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {google.cloud.kms.v1.IPublicKey} message PublicKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PublicKey.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PublicKey message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.PublicKey} PublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PublicKey.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.PublicKey();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pem = reader.string();
+ break;
+ }
+ case 2: {
+ message.algorithm = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pemCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.name = reader.string();
+ break;
+ }
+ case 5: {
+ message.protectionLevel = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PublicKey message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.PublicKey} PublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PublicKey.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PublicKey message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PublicKey.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pem != null && message.hasOwnProperty("pem"))
+ if (!$util.isString(message.pem))
+ return "pem: string expected";
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ switch (message.algorithm) {
+ default:
+ return "algorithm: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 15:
+ case 5:
+ case 6:
+ case 7:
+ case 16:
+ case 28:
+ case 29:
+ case 30:
+ case 8:
+ case 9:
+ case 10:
+ case 17:
+ case 37:
+ case 38:
+ case 39:
+ case 12:
+ case 13:
+ case 31:
+ case 32:
+ case 18:
+ break;
+ }
+ if (message.pemCrc32c != null && message.hasOwnProperty("pemCrc32c")) {
+ var error = $root.google.protobuf.Int64Value.verify(message.pemCrc32c);
+ if (error)
+ return "pemCrc32c." + error;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ switch (message.protectionLevel) {
+ default:
+ return "protectionLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a PublicKey message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.PublicKey} PublicKey
+ */
+ PublicKey.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.PublicKey)
+ return object;
+ var message = new $root.google.cloud.kms.v1.PublicKey();
+ if (object.pem != null)
+ message.pem = String(object.pem);
+ switch (object.algorithm) {
+ default:
+ if (typeof object.algorithm === "number") {
+ message.algorithm = object.algorithm;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED":
+ case 0:
+ message.algorithm = 0;
+ break;
+ case "GOOGLE_SYMMETRIC_ENCRYPTION":
+ case 1:
+ message.algorithm = 1;
+ break;
+ case "RSA_SIGN_PSS_2048_SHA256":
+ case 2:
+ message.algorithm = 2;
+ break;
+ case "RSA_SIGN_PSS_3072_SHA256":
+ case 3:
+ message.algorithm = 3;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA256":
+ case 4:
+ message.algorithm = 4;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA512":
+ case 15:
+ message.algorithm = 15;
+ break;
+ case "RSA_SIGN_PKCS1_2048_SHA256":
+ case 5:
+ message.algorithm = 5;
+ break;
+ case "RSA_SIGN_PKCS1_3072_SHA256":
+ case 6:
+ message.algorithm = 6;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA256":
+ case 7:
+ message.algorithm = 7;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA512":
+ case 16:
+ message.algorithm = 16;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_2048":
+ case 28:
+ message.algorithm = 28;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_3072":
+ case 29:
+ message.algorithm = 29;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_4096":
+ case 30:
+ message.algorithm = 30;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA256":
+ case 8:
+ message.algorithm = 8;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA256":
+ case 9:
+ message.algorithm = 9;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA256":
+ case 10:
+ message.algorithm = 10;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA512":
+ case 17:
+ message.algorithm = 17;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA1":
+ case 37:
+ message.algorithm = 37;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA1":
+ case 38:
+ message.algorithm = 38;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA1":
+ case 39:
+ message.algorithm = 39;
+ break;
+ case "EC_SIGN_P256_SHA256":
+ case 12:
+ message.algorithm = 12;
+ break;
+ case "EC_SIGN_P384_SHA384":
+ case 13:
+ message.algorithm = 13;
+ break;
+ case "EC_SIGN_SECP256K1_SHA256":
+ case 31:
+ message.algorithm = 31;
+ break;
+ case "HMAC_SHA256":
+ case 32:
+ message.algorithm = 32;
+ break;
+ case "EXTERNAL_SYMMETRIC_ENCRYPTION":
+ case 18:
+ message.algorithm = 18;
+ break;
+ }
+ if (object.pemCrc32c != null) {
+ if (typeof object.pemCrc32c !== "object")
+ throw TypeError(".google.cloud.kms.v1.PublicKey.pemCrc32c: object expected");
+ message.pemCrc32c = $root.google.protobuf.Int64Value.fromObject(object.pemCrc32c);
+ }
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.protectionLevel) {
+ default:
+ if (typeof object.protectionLevel === "number") {
+ message.protectionLevel = object.protectionLevel;
+ break;
+ }
+ break;
+ case "PROTECTION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.protectionLevel = 0;
+ break;
+ case "SOFTWARE":
+ case 1:
+ message.protectionLevel = 1;
+ break;
+ case "HSM":
+ case 2:
+ message.protectionLevel = 2;
+ break;
+ case "EXTERNAL":
+ case 3:
+ message.protectionLevel = 3;
+ break;
+ case "EXTERNAL_VPC":
+ case 4:
+ message.protectionLevel = 4;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PublicKey message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {google.cloud.kms.v1.PublicKey} message PublicKey
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PublicKey.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.pem = "";
+ object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0;
+ object.pemCrc32c = null;
+ object.name = "";
+ object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0;
+ }
+ if (message.pem != null && message.hasOwnProperty("pem"))
+ object.pem = message.pem;
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm;
+ if (message.pemCrc32c != null && message.hasOwnProperty("pemCrc32c"))
+ object.pemCrc32c = $root.google.protobuf.Int64Value.toObject(message.pemCrc32c, options);
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel;
+ return object;
+ };
+
+ /**
+ * Converts this PublicKey to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PublicKey.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PublicKey
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.PublicKey
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.PublicKey";
+ };
+
+ return PublicKey;
+ })();
+
+ v1.ImportJob = (function() {
+
+ /**
+ * Properties of an ImportJob.
+ * @memberof google.cloud.kms.v1
+ * @interface IImportJob
+ * @property {string|null} [name] ImportJob name
+ * @property {google.cloud.kms.v1.ImportJob.ImportMethod|null} [importMethod] ImportJob importMethod
+ * @property {google.cloud.kms.v1.ProtectionLevel|null} [protectionLevel] ImportJob protectionLevel
+ * @property {google.protobuf.ITimestamp|null} [createTime] ImportJob createTime
+ * @property {google.protobuf.ITimestamp|null} [generateTime] ImportJob generateTime
+ * @property {google.protobuf.ITimestamp|null} [expireTime] ImportJob expireTime
+ * @property {google.protobuf.ITimestamp|null} [expireEventTime] ImportJob expireEventTime
+ * @property {google.cloud.kms.v1.ImportJob.ImportJobState|null} [state] ImportJob state
+ * @property {google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null} [publicKey] ImportJob publicKey
+ * @property {google.cloud.kms.v1.IKeyOperationAttestation|null} [attestation] ImportJob attestation
+ */
+
+ /**
+ * Constructs a new ImportJob.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an ImportJob.
+ * @implements IImportJob
+ * @constructor
+ * @param {google.cloud.kms.v1.IImportJob=} [properties] Properties to set
+ */
+ function ImportJob(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ImportJob name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.name = "";
+
+ /**
+ * ImportJob importMethod.
+ * @member {google.cloud.kms.v1.ImportJob.ImportMethod} importMethod
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.importMethod = 0;
+
+ /**
+ * ImportJob protectionLevel.
+ * @member {google.cloud.kms.v1.ProtectionLevel} protectionLevel
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.protectionLevel = 0;
+
+ /**
+ * ImportJob createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.createTime = null;
+
+ /**
+ * ImportJob generateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} generateTime
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.generateTime = null;
+
+ /**
+ * ImportJob expireTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} expireTime
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.expireTime = null;
+
+ /**
+ * ImportJob expireEventTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} expireEventTime
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.expireEventTime = null;
+
+ /**
+ * ImportJob state.
+ * @member {google.cloud.kms.v1.ImportJob.ImportJobState} state
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.state = 0;
+
+ /**
+ * ImportJob publicKey.
+ * @member {google.cloud.kms.v1.ImportJob.IWrappingPublicKey|null|undefined} publicKey
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.publicKey = null;
+
+ /**
+ * ImportJob attestation.
+ * @member {google.cloud.kms.v1.IKeyOperationAttestation|null|undefined} attestation
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ */
+ ImportJob.prototype.attestation = null;
+
+ /**
+ * Creates a new ImportJob instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {google.cloud.kms.v1.IImportJob=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ImportJob} ImportJob instance
+ */
+ ImportJob.create = function create(properties) {
+ return new ImportJob(properties);
+ };
+
+ /**
+ * Encodes the specified ImportJob message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {google.cloud.kms.v1.IImportJob} message ImportJob message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportJob.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.importMethod != null && Object.hasOwnProperty.call(message, "importMethod"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.importMethod);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.generateTime != null && Object.hasOwnProperty.call(message, "generateTime"))
+ $root.google.protobuf.Timestamp.encode(message.generateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime"))
+ $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state);
+ if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
+ $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.encode(message.publicKey, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation"))
+ $root.google.cloud.kms.v1.KeyOperationAttestation.encode(message.attestation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.protectionLevel != null && Object.hasOwnProperty.call(message, "protectionLevel"))
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.protectionLevel);
+ if (message.expireEventTime != null && Object.hasOwnProperty.call(message, "expireEventTime"))
+ $root.google.protobuf.Timestamp.encode(message.expireEventTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportJob message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {google.cloud.kms.v1.IImportJob} message ImportJob message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportJob.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportJob message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ImportJob} ImportJob
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportJob.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ImportJob();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.importMethod = reader.int32();
+ break;
+ }
+ case 9: {
+ message.protectionLevel = reader.int32();
+ break;
+ }
+ case 3: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.generateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 10: {
+ message.expireEventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.state = reader.int32();
+ break;
+ }
+ case 7: {
+ message.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportJob message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ImportJob} ImportJob
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportJob.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportJob message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportJob.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.importMethod != null && message.hasOwnProperty("importMethod"))
+ switch (message.importMethod) {
+ default:
+ return "importMethod: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ switch (message.protectionLevel) {
+ default:
+ return "protectionLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.generateTime != null && message.hasOwnProperty("generateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.generateTime);
+ if (error)
+ return "generateTime." + error;
+ }
+ if (message.expireTime != null && message.hasOwnProperty("expireTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.expireTime);
+ if (error)
+ return "expireTime." + error;
+ }
+ if (message.expireEventTime != null && message.hasOwnProperty("expireEventTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.expireEventTime);
+ if (error)
+ return "expireEventTime." + 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:
+ break;
+ }
+ if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
+ var error = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify(message.publicKey);
+ if (error)
+ return "publicKey." + error;
+ }
+ if (message.attestation != null && message.hasOwnProperty("attestation")) {
+ var error = $root.google.cloud.kms.v1.KeyOperationAttestation.verify(message.attestation);
+ if (error)
+ return "attestation." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportJob message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ImportJob} ImportJob
+ */
+ ImportJob.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ImportJob)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ImportJob();
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.importMethod) {
+ default:
+ if (typeof object.importMethod === "number") {
+ message.importMethod = object.importMethod;
+ break;
+ }
+ break;
+ case "IMPORT_METHOD_UNSPECIFIED":
+ case 0:
+ message.importMethod = 0;
+ break;
+ case "RSA_OAEP_3072_SHA1_AES_256":
+ case 1:
+ message.importMethod = 1;
+ break;
+ case "RSA_OAEP_4096_SHA1_AES_256":
+ case 2:
+ message.importMethod = 2;
+ break;
+ }
+ switch (object.protectionLevel) {
+ default:
+ if (typeof object.protectionLevel === "number") {
+ message.protectionLevel = object.protectionLevel;
+ break;
+ }
+ break;
+ case "PROTECTION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.protectionLevel = 0;
+ break;
+ case "SOFTWARE":
+ case 1:
+ message.protectionLevel = 1;
+ break;
+ case "HSM":
+ case 2:
+ message.protectionLevel = 2;
+ break;
+ case "EXTERNAL":
+ case 3:
+ message.protectionLevel = 3;
+ break;
+ case "EXTERNAL_VPC":
+ case 4:
+ message.protectionLevel = 4;
+ break;
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.generateTime != null) {
+ if (typeof object.generateTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.generateTime: object expected");
+ message.generateTime = $root.google.protobuf.Timestamp.fromObject(object.generateTime);
+ }
+ if (object.expireTime != null) {
+ if (typeof object.expireTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.expireTime: object expected");
+ message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime);
+ }
+ if (object.expireEventTime != null) {
+ if (typeof object.expireEventTime !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.expireEventTime: object expected");
+ message.expireEventTime = $root.google.protobuf.Timestamp.fromObject(object.expireEventTime);
+ }
+ switch (object.state) {
+ default:
+ if (typeof object.state === "number") {
+ message.state = object.state;
+ break;
+ }
+ break;
+ case "IMPORT_JOB_STATE_UNSPECIFIED":
+ case 0:
+ message.state = 0;
+ break;
+ case "PENDING_GENERATION":
+ case 1:
+ message.state = 1;
+ break;
+ case "ACTIVE":
+ case 2:
+ message.state = 2;
+ break;
+ case "EXPIRED":
+ case 3:
+ message.state = 3;
+ break;
+ }
+ if (object.publicKey != null) {
+ if (typeof object.publicKey !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.publicKey: object expected");
+ message.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.fromObject(object.publicKey);
+ }
+ if (object.attestation != null) {
+ if (typeof object.attestation !== "object")
+ throw TypeError(".google.cloud.kms.v1.ImportJob.attestation: object expected");
+ message.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.fromObject(object.attestation);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportJob message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {google.cloud.kms.v1.ImportJob} message ImportJob
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportJob.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.importMethod = options.enums === String ? "IMPORT_METHOD_UNSPECIFIED" : 0;
+ object.createTime = null;
+ object.generateTime = null;
+ object.expireTime = null;
+ object.state = options.enums === String ? "IMPORT_JOB_STATE_UNSPECIFIED" : 0;
+ object.publicKey = null;
+ object.attestation = null;
+ object.protectionLevel = options.enums === String ? "PROTECTION_LEVEL_UNSPECIFIED" : 0;
+ object.expireEventTime = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.importMethod != null && message.hasOwnProperty("importMethod"))
+ object.importMethod = options.enums === String ? $root.google.cloud.kms.v1.ImportJob.ImportMethod[message.importMethod] === undefined ? message.importMethod : $root.google.cloud.kms.v1.ImportJob.ImportMethod[message.importMethod] : message.importMethod;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.generateTime != null && message.hasOwnProperty("generateTime"))
+ object.generateTime = $root.google.protobuf.Timestamp.toObject(message.generateTime, options);
+ if (message.expireTime != null && message.hasOwnProperty("expireTime"))
+ object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options);
+ if (message.state != null && message.hasOwnProperty("state"))
+ object.state = options.enums === String ? $root.google.cloud.kms.v1.ImportJob.ImportJobState[message.state] === undefined ? message.state : $root.google.cloud.kms.v1.ImportJob.ImportJobState[message.state] : message.state;
+ if (message.publicKey != null && message.hasOwnProperty("publicKey"))
+ object.publicKey = $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey.toObject(message.publicKey, options);
+ if (message.attestation != null && message.hasOwnProperty("attestation"))
+ object.attestation = $root.google.cloud.kms.v1.KeyOperationAttestation.toObject(message.attestation, options);
+ if (message.protectionLevel != null && message.hasOwnProperty("protectionLevel"))
+ object.protectionLevel = options.enums === String ? $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] === undefined ? message.protectionLevel : $root.google.cloud.kms.v1.ProtectionLevel[message.protectionLevel] : message.protectionLevel;
+ if (message.expireEventTime != null && message.hasOwnProperty("expireEventTime"))
+ object.expireEventTime = $root.google.protobuf.Timestamp.toObject(message.expireEventTime, options);
+ return object;
+ };
+
+ /**
+ * Converts this ImportJob to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportJob.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportJob
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ImportJob";
+ };
+
+ /**
+ * ImportMethod enum.
+ * @name google.cloud.kms.v1.ImportJob.ImportMethod
+ * @enum {number}
+ * @property {number} IMPORT_METHOD_UNSPECIFIED=0 IMPORT_METHOD_UNSPECIFIED value
+ * @property {number} RSA_OAEP_3072_SHA1_AES_256=1 RSA_OAEP_3072_SHA1_AES_256 value
+ * @property {number} RSA_OAEP_4096_SHA1_AES_256=2 RSA_OAEP_4096_SHA1_AES_256 value
+ */
+ ImportJob.ImportMethod = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "IMPORT_METHOD_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "RSA_OAEP_3072_SHA1_AES_256"] = 1;
+ values[valuesById[2] = "RSA_OAEP_4096_SHA1_AES_256"] = 2;
+ return values;
+ })();
+
+ /**
+ * ImportJobState enum.
+ * @name google.cloud.kms.v1.ImportJob.ImportJobState
+ * @enum {number}
+ * @property {number} IMPORT_JOB_STATE_UNSPECIFIED=0 IMPORT_JOB_STATE_UNSPECIFIED value
+ * @property {number} PENDING_GENERATION=1 PENDING_GENERATION value
+ * @property {number} ACTIVE=2 ACTIVE value
+ * @property {number} EXPIRED=3 EXPIRED value
+ */
+ ImportJob.ImportJobState = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "IMPORT_JOB_STATE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "PENDING_GENERATION"] = 1;
+ values[valuesById[2] = "ACTIVE"] = 2;
+ values[valuesById[3] = "EXPIRED"] = 3;
+ return values;
+ })();
+
+ ImportJob.WrappingPublicKey = (function() {
+
+ /**
+ * Properties of a WrappingPublicKey.
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @interface IWrappingPublicKey
+ * @property {string|null} [pem] WrappingPublicKey pem
+ */
+
+ /**
+ * Constructs a new WrappingPublicKey.
+ * @memberof google.cloud.kms.v1.ImportJob
+ * @classdesc Represents a WrappingPublicKey.
+ * @implements IWrappingPublicKey
+ * @constructor
+ * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey=} [properties] Properties to set
+ */
+ function WrappingPublicKey(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * WrappingPublicKey pem.
+ * @member {string} pem
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @instance
+ */
+ WrappingPublicKey.prototype.pem = "";
+
+ /**
+ * Creates a new WrappingPublicKey instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey instance
+ */
+ WrappingPublicKey.create = function create(properties) {
+ return new WrappingPublicKey(properties);
+ };
+
+ /**
+ * Encodes the specified WrappingPublicKey message. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey} message WrappingPublicKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WrappingPublicKey.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pem != null && Object.hasOwnProperty.call(message, "pem"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.pem);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified WrappingPublicKey message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportJob.WrappingPublicKey.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {google.cloud.kms.v1.ImportJob.IWrappingPublicKey} message WrappingPublicKey message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WrappingPublicKey.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a WrappingPublicKey message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WrappingPublicKey.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pem = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a WrappingPublicKey message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WrappingPublicKey.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a WrappingPublicKey message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ WrappingPublicKey.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pem != null && message.hasOwnProperty("pem"))
+ if (!$util.isString(message.pem))
+ return "pem: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a WrappingPublicKey message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ImportJob.WrappingPublicKey} WrappingPublicKey
+ */
+ WrappingPublicKey.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ImportJob.WrappingPublicKey();
+ if (object.pem != null)
+ message.pem = String(object.pem);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a WrappingPublicKey message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {google.cloud.kms.v1.ImportJob.WrappingPublicKey} message WrappingPublicKey
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ WrappingPublicKey.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.pem = "";
+ if (message.pem != null && message.hasOwnProperty("pem"))
+ object.pem = message.pem;
+ return object;
+ };
+
+ /**
+ * Converts this WrappingPublicKey to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ WrappingPublicKey.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for WrappingPublicKey
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ImportJob.WrappingPublicKey
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ WrappingPublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ImportJob.WrappingPublicKey";
+ };
+
+ return WrappingPublicKey;
+ })();
+
+ return ImportJob;
+ })();
+
+ v1.ExternalProtectionLevelOptions = (function() {
+
+ /**
+ * Properties of an ExternalProtectionLevelOptions.
+ * @memberof google.cloud.kms.v1
+ * @interface IExternalProtectionLevelOptions
+ * @property {string|null} [externalKeyUri] ExternalProtectionLevelOptions externalKeyUri
+ * @property {string|null} [ekmConnectionKeyPath] ExternalProtectionLevelOptions ekmConnectionKeyPath
+ */
+
+ /**
+ * Constructs a new ExternalProtectionLevelOptions.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an ExternalProtectionLevelOptions.
+ * @implements IExternalProtectionLevelOptions
+ * @constructor
+ * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions=} [properties] Properties to set
+ */
+ function ExternalProtectionLevelOptions(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ExternalProtectionLevelOptions externalKeyUri.
+ * @member {string} externalKeyUri
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @instance
+ */
+ ExternalProtectionLevelOptions.prototype.externalKeyUri = "";
+
+ /**
+ * ExternalProtectionLevelOptions ekmConnectionKeyPath.
+ * @member {string} ekmConnectionKeyPath
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @instance
+ */
+ ExternalProtectionLevelOptions.prototype.ekmConnectionKeyPath = "";
+
+ /**
+ * Creates a new ExternalProtectionLevelOptions instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions instance
+ */
+ ExternalProtectionLevelOptions.create = function create(properties) {
+ return new ExternalProtectionLevelOptions(properties);
+ };
+
+ /**
+ * Encodes the specified ExternalProtectionLevelOptions message. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions} message ExternalProtectionLevelOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExternalProtectionLevelOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.externalKeyUri != null && Object.hasOwnProperty.call(message, "externalKeyUri"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.externalKeyUri);
+ if (message.ekmConnectionKeyPath != null && Object.hasOwnProperty.call(message, "ekmConnectionKeyPath"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.ekmConnectionKeyPath);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ExternalProtectionLevelOptions message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ExternalProtectionLevelOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {google.cloud.kms.v1.IExternalProtectionLevelOptions} message ExternalProtectionLevelOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExternalProtectionLevelOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExternalProtectionLevelOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ExternalProtectionLevelOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.externalKeyUri = reader.string();
+ break;
+ }
+ case 2: {
+ message.ekmConnectionKeyPath = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ExternalProtectionLevelOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExternalProtectionLevelOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ExternalProtectionLevelOptions message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ExternalProtectionLevelOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.externalKeyUri != null && message.hasOwnProperty("externalKeyUri"))
+ if (!$util.isString(message.externalKeyUri))
+ return "externalKeyUri: string expected";
+ if (message.ekmConnectionKeyPath != null && message.hasOwnProperty("ekmConnectionKeyPath"))
+ if (!$util.isString(message.ekmConnectionKeyPath))
+ return "ekmConnectionKeyPath: string expected";
+ return null;
+ };
+
+ /**
+ * Creates an ExternalProtectionLevelOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ExternalProtectionLevelOptions} ExternalProtectionLevelOptions
+ */
+ ExternalProtectionLevelOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ExternalProtectionLevelOptions)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ExternalProtectionLevelOptions();
+ if (object.externalKeyUri != null)
+ message.externalKeyUri = String(object.externalKeyUri);
+ if (object.ekmConnectionKeyPath != null)
+ message.ekmConnectionKeyPath = String(object.ekmConnectionKeyPath);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ExternalProtectionLevelOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {google.cloud.kms.v1.ExternalProtectionLevelOptions} message ExternalProtectionLevelOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ExternalProtectionLevelOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.externalKeyUri = "";
+ object.ekmConnectionKeyPath = "";
+ }
+ if (message.externalKeyUri != null && message.hasOwnProperty("externalKeyUri"))
+ object.externalKeyUri = message.externalKeyUri;
+ if (message.ekmConnectionKeyPath != null && message.hasOwnProperty("ekmConnectionKeyPath"))
+ object.ekmConnectionKeyPath = message.ekmConnectionKeyPath;
+ return object;
+ };
+
+ /**
+ * Converts this ExternalProtectionLevelOptions to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ExternalProtectionLevelOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ExternalProtectionLevelOptions
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ExternalProtectionLevelOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ExternalProtectionLevelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ExternalProtectionLevelOptions";
+ };
+
+ return ExternalProtectionLevelOptions;
+ })();
+
+ /**
+ * ProtectionLevel enum.
+ * @name google.cloud.kms.v1.ProtectionLevel
+ * @enum {number}
+ * @property {number} PROTECTION_LEVEL_UNSPECIFIED=0 PROTECTION_LEVEL_UNSPECIFIED value
+ * @property {number} SOFTWARE=1 SOFTWARE value
+ * @property {number} HSM=2 HSM value
+ * @property {number} EXTERNAL=3 EXTERNAL value
+ * @property {number} EXTERNAL_VPC=4 EXTERNAL_VPC value
+ */
+ v1.ProtectionLevel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "PROTECTION_LEVEL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "SOFTWARE"] = 1;
+ values[valuesById[2] = "HSM"] = 2;
+ values[valuesById[3] = "EXTERNAL"] = 3;
+ values[valuesById[4] = "EXTERNAL_VPC"] = 4;
+ return values;
+ })();
+
+ v1.KeyManagementService = (function() {
+
+ /**
+ * Constructs a new KeyManagementService service.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a KeyManagementService
+ * @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 KeyManagementService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (KeyManagementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = KeyManagementService;
+
+ /**
+ * Creates new KeyManagementService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @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 {KeyManagementService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ KeyManagementService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listKeyRings}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef ListKeyRingsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ListKeyRingsResponse} [response] ListKeyRingsResponse
+ */
+
+ /**
+ * Calls ListKeyRings.
+ * @function listKeyRings
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest} request ListKeyRingsRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.ListKeyRingsCallback} callback Node-style callback called with the error, if any, and ListKeyRingsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.listKeyRings = function listKeyRings(request, callback) {
+ return this.rpcCall(listKeyRings, $root.google.cloud.kms.v1.ListKeyRingsRequest, $root.google.cloud.kms.v1.ListKeyRingsResponse, request, callback);
+ }, "name", { value: "ListKeyRings" });
+
+ /**
+ * Calls ListKeyRings.
+ * @function listKeyRings
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest} request ListKeyRingsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listCryptoKeys}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef ListCryptoKeysCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ListCryptoKeysResponse} [response] ListCryptoKeysResponse
+ */
+
+ /**
+ * Calls ListCryptoKeys.
+ * @function listCryptoKeys
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest} request ListCryptoKeysRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.ListCryptoKeysCallback} callback Node-style callback called with the error, if any, and ListCryptoKeysResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.listCryptoKeys = function listCryptoKeys(request, callback) {
+ return this.rpcCall(listCryptoKeys, $root.google.cloud.kms.v1.ListCryptoKeysRequest, $root.google.cloud.kms.v1.ListCryptoKeysResponse, request, callback);
+ }, "name", { value: "ListCryptoKeys" });
+
+ /**
+ * Calls ListCryptoKeys.
+ * @function listCryptoKeys
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest} request ListCryptoKeysRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listCryptoKeyVersions}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef ListCryptoKeyVersionsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} [response] ListCryptoKeyVersionsResponse
+ */
+
+ /**
+ * Calls ListCryptoKeyVersions.
+ * @function listCryptoKeyVersions
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest} request ListCryptoKeyVersionsRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersionsCallback} callback Node-style callback called with the error, if any, and ListCryptoKeyVersionsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.listCryptoKeyVersions = function listCryptoKeyVersions(request, callback) {
+ return this.rpcCall(listCryptoKeyVersions, $root.google.cloud.kms.v1.ListCryptoKeyVersionsRequest, $root.google.cloud.kms.v1.ListCryptoKeyVersionsResponse, request, callback);
+ }, "name", { value: "ListCryptoKeyVersions" });
+
+ /**
+ * Calls ListCryptoKeyVersions.
+ * @function listCryptoKeyVersions
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest} request ListCryptoKeyVersionsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|listImportJobs}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef ListImportJobsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ListImportJobsResponse} [response] ListImportJobsResponse
+ */
+
+ /**
+ * Calls ListImportJobs.
+ * @function listImportJobs
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListImportJobsRequest} request ListImportJobsRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.ListImportJobsCallback} callback Node-style callback called with the error, if any, and ListImportJobsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.listImportJobs = function listImportJobs(request, callback) {
+ return this.rpcCall(listImportJobs, $root.google.cloud.kms.v1.ListImportJobsRequest, $root.google.cloud.kms.v1.ListImportJobsResponse, request, callback);
+ }, "name", { value: "ListImportJobs" });
+
+ /**
+ * Calls ListImportJobs.
+ * @function listImportJobs
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IListImportJobsRequest} request ListImportJobsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getKeyRing}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GetKeyRingCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.KeyRing} [response] KeyRing
+ */
+
+ /**
+ * Calls GetKeyRing.
+ * @function getKeyRing
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest} request GetKeyRingRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GetKeyRingCallback} callback Node-style callback called with the error, if any, and KeyRing
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.getKeyRing = function getKeyRing(request, callback) {
+ return this.rpcCall(getKeyRing, $root.google.cloud.kms.v1.GetKeyRingRequest, $root.google.cloud.kms.v1.KeyRing, request, callback);
+ }, "name", { value: "GetKeyRing" });
+
+ /**
+ * Calls GetKeyRing.
+ * @function getKeyRing
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest} request GetKeyRingRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getCryptoKey}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GetCryptoKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKey} [response] CryptoKey
+ */
+
+ /**
+ * Calls GetCryptoKey.
+ * @function getCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest} request GetCryptoKeyRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GetCryptoKeyCallback} callback Node-style callback called with the error, if any, and CryptoKey
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.getCryptoKey = function getCryptoKey(request, callback) {
+ return this.rpcCall(getCryptoKey, $root.google.cloud.kms.v1.GetCryptoKeyRequest, $root.google.cloud.kms.v1.CryptoKey, request, callback);
+ }, "name", { value: "GetCryptoKey" });
+
+ /**
+ * Calls GetCryptoKey.
+ * @function getCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest} request GetCryptoKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GetCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls GetCryptoKeyVersion.
+ * @function getCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest} request GetCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.getCryptoKeyVersion = function getCryptoKeyVersion(request, callback) {
+ return this.rpcCall(getCryptoKeyVersion, $root.google.cloud.kms.v1.GetCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "GetCryptoKeyVersion" });
+
+ /**
+ * Calls GetCryptoKeyVersion.
+ * @function getCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest} request GetCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getPublicKey}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GetPublicKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.PublicKey} [response] PublicKey
+ */
+
+ /**
+ * Calls GetPublicKey.
+ * @function getPublicKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest} request GetPublicKeyRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GetPublicKeyCallback} callback Node-style callback called with the error, if any, and PublicKey
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.getPublicKey = function getPublicKey(request, callback) {
+ return this.rpcCall(getPublicKey, $root.google.cloud.kms.v1.GetPublicKeyRequest, $root.google.cloud.kms.v1.PublicKey, request, callback);
+ }, "name", { value: "GetPublicKey" });
+
+ /**
+ * Calls GetPublicKey.
+ * @function getPublicKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest} request GetPublicKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|getImportJob}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GetImportJobCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ImportJob} [response] ImportJob
+ */
+
+ /**
+ * Calls GetImportJob.
+ * @function getImportJob
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetImportJobRequest} request GetImportJobRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GetImportJobCallback} callback Node-style callback called with the error, if any, and ImportJob
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.getImportJob = function getImportJob(request, callback) {
+ return this.rpcCall(getImportJob, $root.google.cloud.kms.v1.GetImportJobRequest, $root.google.cloud.kms.v1.ImportJob, request, callback);
+ }, "name", { value: "GetImportJob" });
+
+ /**
+ * Calls GetImportJob.
+ * @function getImportJob
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGetImportJobRequest} request GetImportJobRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createKeyRing}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef CreateKeyRingCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.KeyRing} [response] KeyRing
+ */
+
+ /**
+ * Calls CreateKeyRing.
+ * @function createKeyRing
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest} request CreateKeyRingRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.CreateKeyRingCallback} callback Node-style callback called with the error, if any, and KeyRing
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.createKeyRing = function createKeyRing(request, callback) {
+ return this.rpcCall(createKeyRing, $root.google.cloud.kms.v1.CreateKeyRingRequest, $root.google.cloud.kms.v1.KeyRing, request, callback);
+ }, "name", { value: "CreateKeyRing" });
+
+ /**
+ * Calls CreateKeyRing.
+ * @function createKeyRing
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest} request CreateKeyRingRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createCryptoKey}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef CreateCryptoKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKey} [response] CryptoKey
+ */
+
+ /**
+ * Calls CreateCryptoKey.
+ * @function createCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest} request CreateCryptoKeyRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyCallback} callback Node-style callback called with the error, if any, and CryptoKey
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.createCryptoKey = function createCryptoKey(request, callback) {
+ return this.rpcCall(createCryptoKey, $root.google.cloud.kms.v1.CreateCryptoKeyRequest, $root.google.cloud.kms.v1.CryptoKey, request, callback);
+ }, "name", { value: "CreateCryptoKey" });
+
+ /**
+ * Calls CreateCryptoKey.
+ * @function createCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest} request CreateCryptoKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef CreateCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls CreateCryptoKeyVersion.
+ * @function createCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest} request CreateCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.createCryptoKeyVersion = function createCryptoKeyVersion(request, callback) {
+ return this.rpcCall(createCryptoKeyVersion, $root.google.cloud.kms.v1.CreateCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "CreateCryptoKeyVersion" });
+
+ /**
+ * Calls CreateCryptoKeyVersion.
+ * @function createCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest} request CreateCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|importCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef ImportCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls ImportCryptoKeyVersion.
+ * @function importCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest} request ImportCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.importCryptoKeyVersion = function importCryptoKeyVersion(request, callback) {
+ return this.rpcCall(importCryptoKeyVersion, $root.google.cloud.kms.v1.ImportCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "ImportCryptoKeyVersion" });
+
+ /**
+ * Calls ImportCryptoKeyVersion.
+ * @function importCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest} request ImportCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|createImportJob}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef CreateImportJobCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.ImportJob} [response] ImportJob
+ */
+
+ /**
+ * Calls CreateImportJob.
+ * @function createImportJob
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest} request CreateImportJobRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.CreateImportJobCallback} callback Node-style callback called with the error, if any, and ImportJob
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.createImportJob = function createImportJob(request, callback) {
+ return this.rpcCall(createImportJob, $root.google.cloud.kms.v1.CreateImportJobRequest, $root.google.cloud.kms.v1.ImportJob, request, callback);
+ }, "name", { value: "CreateImportJob" });
+
+ /**
+ * Calls CreateImportJob.
+ * @function createImportJob
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest} request CreateImportJobRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKey}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef UpdateCryptoKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKey} [response] CryptoKey
+ */
+
+ /**
+ * Calls UpdateCryptoKey.
+ * @function updateCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest} request UpdateCryptoKeyRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyCallback} callback Node-style callback called with the error, if any, and CryptoKey
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.updateCryptoKey = function updateCryptoKey(request, callback) {
+ return this.rpcCall(updateCryptoKey, $root.google.cloud.kms.v1.UpdateCryptoKeyRequest, $root.google.cloud.kms.v1.CryptoKey, request, callback);
+ }, "name", { value: "UpdateCryptoKey" });
+
+ /**
+ * Calls UpdateCryptoKey.
+ * @function updateCryptoKey
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest} request UpdateCryptoKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef UpdateCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls UpdateCryptoKeyVersion.
+ * @function updateCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest} request UpdateCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.updateCryptoKeyVersion = function updateCryptoKeyVersion(request, callback) {
+ return this.rpcCall(updateCryptoKeyVersion, $root.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "UpdateCryptoKeyVersion" });
+
+ /**
+ * Calls UpdateCryptoKeyVersion.
+ * @function updateCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest} request UpdateCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|updateCryptoKeyPrimaryVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef UpdateCryptoKeyPrimaryVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKey} [response] CryptoKey
+ */
+
+ /**
+ * Calls UpdateCryptoKeyPrimaryVersion.
+ * @function updateCryptoKeyPrimaryVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest} request UpdateCryptoKeyPrimaryVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersionCallback} callback Node-style callback called with the error, if any, and CryptoKey
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.updateCryptoKeyPrimaryVersion = function updateCryptoKeyPrimaryVersion(request, callback) {
+ return this.rpcCall(updateCryptoKeyPrimaryVersion, $root.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest, $root.google.cloud.kms.v1.CryptoKey, request, callback);
+ }, "name", { value: "UpdateCryptoKeyPrimaryVersion" });
+
+ /**
+ * Calls UpdateCryptoKeyPrimaryVersion.
+ * @function updateCryptoKeyPrimaryVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest} request UpdateCryptoKeyPrimaryVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|destroyCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef DestroyCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls DestroyCryptoKeyVersion.
+ * @function destroyCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest} request DestroyCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.destroyCryptoKeyVersion = function destroyCryptoKeyVersion(request, callback) {
+ return this.rpcCall(destroyCryptoKeyVersion, $root.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "DestroyCryptoKeyVersion" });
+
+ /**
+ * Calls DestroyCryptoKeyVersion.
+ * @function destroyCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest} request DestroyCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|restoreCryptoKeyVersion}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef RestoreCryptoKeyVersionCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.CryptoKeyVersion} [response] CryptoKeyVersion
+ */
+
+ /**
+ * Calls RestoreCryptoKeyVersion.
+ * @function restoreCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest} request RestoreCryptoKeyVersionRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersionCallback} callback Node-style callback called with the error, if any, and CryptoKeyVersion
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.restoreCryptoKeyVersion = function restoreCryptoKeyVersion(request, callback) {
+ return this.rpcCall(restoreCryptoKeyVersion, $root.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest, $root.google.cloud.kms.v1.CryptoKeyVersion, request, callback);
+ }, "name", { value: "RestoreCryptoKeyVersion" });
+
+ /**
+ * Calls RestoreCryptoKeyVersion.
+ * @function restoreCryptoKeyVersion
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest} request RestoreCryptoKeyVersionRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|encrypt}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef EncryptCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.EncryptResponse} [response] EncryptResponse
+ */
+
+ /**
+ * Calls Encrypt.
+ * @function encrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IEncryptRequest} request EncryptRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.EncryptCallback} callback Node-style callback called with the error, if any, and EncryptResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.encrypt = function encrypt(request, callback) {
+ return this.rpcCall(encrypt, $root.google.cloud.kms.v1.EncryptRequest, $root.google.cloud.kms.v1.EncryptResponse, request, callback);
+ }, "name", { value: "Encrypt" });
+
+ /**
+ * Calls Encrypt.
+ * @function encrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IEncryptRequest} request EncryptRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|decrypt}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef DecryptCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.DecryptResponse} [response] DecryptResponse
+ */
+
+ /**
+ * Calls Decrypt.
+ * @function decrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IDecryptRequest} request DecryptRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.DecryptCallback} callback Node-style callback called with the error, if any, and DecryptResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.decrypt = function decrypt(request, callback) {
+ return this.rpcCall(decrypt, $root.google.cloud.kms.v1.DecryptRequest, $root.google.cloud.kms.v1.DecryptResponse, request, callback);
+ }, "name", { value: "Decrypt" });
+
+ /**
+ * Calls Decrypt.
+ * @function decrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IDecryptRequest} request DecryptRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|asymmetricSign}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef AsymmetricSignCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.AsymmetricSignResponse} [response] AsymmetricSignResponse
+ */
+
+ /**
+ * Calls AsymmetricSign.
+ * @function asymmetricSign
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IAsymmetricSignRequest} request AsymmetricSignRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.AsymmetricSignCallback} callback Node-style callback called with the error, if any, and AsymmetricSignResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.asymmetricSign = function asymmetricSign(request, callback) {
+ return this.rpcCall(asymmetricSign, $root.google.cloud.kms.v1.AsymmetricSignRequest, $root.google.cloud.kms.v1.AsymmetricSignResponse, request, callback);
+ }, "name", { value: "AsymmetricSign" });
+
+ /**
+ * Calls AsymmetricSign.
+ * @function asymmetricSign
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IAsymmetricSignRequest} request AsymmetricSignRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|asymmetricDecrypt}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef AsymmetricDecryptCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.AsymmetricDecryptResponse} [response] AsymmetricDecryptResponse
+ */
+
+ /**
+ * Calls AsymmetricDecrypt.
+ * @function asymmetricDecrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IAsymmetricDecryptRequest} request AsymmetricDecryptRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.AsymmetricDecryptCallback} callback Node-style callback called with the error, if any, and AsymmetricDecryptResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.asymmetricDecrypt = function asymmetricDecrypt(request, callback) {
+ return this.rpcCall(asymmetricDecrypt, $root.google.cloud.kms.v1.AsymmetricDecryptRequest, $root.google.cloud.kms.v1.AsymmetricDecryptResponse, request, callback);
+ }, "name", { value: "AsymmetricDecrypt" });
+
+ /**
+ * Calls AsymmetricDecrypt.
+ * @function asymmetricDecrypt
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IAsymmetricDecryptRequest} request AsymmetricDecryptRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|macSign}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef MacSignCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.MacSignResponse} [response] MacSignResponse
+ */
+
+ /**
+ * Calls MacSign.
+ * @function macSign
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IMacSignRequest} request MacSignRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.MacSignCallback} callback Node-style callback called with the error, if any, and MacSignResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.macSign = function macSign(request, callback) {
+ return this.rpcCall(macSign, $root.google.cloud.kms.v1.MacSignRequest, $root.google.cloud.kms.v1.MacSignResponse, request, callback);
+ }, "name", { value: "MacSign" });
+
+ /**
+ * Calls MacSign.
+ * @function macSign
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IMacSignRequest} request MacSignRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|macVerify}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef MacVerifyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.MacVerifyResponse} [response] MacVerifyResponse
+ */
+
+ /**
+ * Calls MacVerify.
+ * @function macVerify
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IMacVerifyRequest} request MacVerifyRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.MacVerifyCallback} callback Node-style callback called with the error, if any, and MacVerifyResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.macVerify = function macVerify(request, callback) {
+ return this.rpcCall(macVerify, $root.google.cloud.kms.v1.MacVerifyRequest, $root.google.cloud.kms.v1.MacVerifyResponse, request, callback);
+ }, "name", { value: "MacVerify" });
+
+ /**
+ * Calls MacVerify.
+ * @function macVerify
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IMacVerifyRequest} request MacVerifyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.kms.v1.KeyManagementService|generateRandomBytes}.
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @typedef GenerateRandomBytesCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.kms.v1.GenerateRandomBytesResponse} [response] GenerateRandomBytesResponse
+ */
+
+ /**
+ * Calls GenerateRandomBytes.
+ * @function generateRandomBytes
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGenerateRandomBytesRequest} request GenerateRandomBytesRequest message or plain object
+ * @param {google.cloud.kms.v1.KeyManagementService.GenerateRandomBytesCallback} callback Node-style callback called with the error, if any, and GenerateRandomBytesResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(KeyManagementService.prototype.generateRandomBytes = function generateRandomBytes(request, callback) {
+ return this.rpcCall(generateRandomBytes, $root.google.cloud.kms.v1.GenerateRandomBytesRequest, $root.google.cloud.kms.v1.GenerateRandomBytesResponse, request, callback);
+ }, "name", { value: "GenerateRandomBytes" });
+
+ /**
+ * Calls GenerateRandomBytes.
+ * @function generateRandomBytes
+ * @memberof google.cloud.kms.v1.KeyManagementService
+ * @instance
+ * @param {google.cloud.kms.v1.IGenerateRandomBytesRequest} request GenerateRandomBytesRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return KeyManagementService;
+ })();
+
+ v1.ListKeyRingsRequest = (function() {
+
+ /**
+ * Properties of a ListKeyRingsRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IListKeyRingsRequest
+ * @property {string|null} [parent] ListKeyRingsRequest parent
+ * @property {number|null} [pageSize] ListKeyRingsRequest pageSize
+ * @property {string|null} [pageToken] ListKeyRingsRequest pageToken
+ * @property {string|null} [filter] ListKeyRingsRequest filter
+ * @property {string|null} [orderBy] ListKeyRingsRequest orderBy
+ */
+
+ /**
+ * Constructs a new ListKeyRingsRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListKeyRingsRequest.
+ * @implements IListKeyRingsRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest=} [properties] Properties to set
+ */
+ function ListKeyRingsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListKeyRingsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ */
+ ListKeyRingsRequest.prototype.parent = "";
+
+ /**
+ * ListKeyRingsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ */
+ ListKeyRingsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListKeyRingsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ */
+ ListKeyRingsRequest.prototype.pageToken = "";
+
+ /**
+ * ListKeyRingsRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ */
+ ListKeyRingsRequest.prototype.filter = "";
+
+ /**
+ * ListKeyRingsRequest orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ */
+ ListKeyRingsRequest.prototype.orderBy = "";
+
+ /**
+ * Creates a new ListKeyRingsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListKeyRingsRequest} ListKeyRingsRequest instance
+ */
+ ListKeyRingsRequest.create = function create(properties) {
+ return new ListKeyRingsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListKeyRingsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest} message ListKeyRingsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeyRingsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListKeyRingsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsRequest} message ListKeyRingsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeyRingsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListKeyRingsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListKeyRingsRequest} ListKeyRingsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeyRingsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListKeyRingsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pageToken = reader.string();
+ break;
+ }
+ case 4: {
+ message.filter = reader.string();
+ break;
+ }
+ case 5: {
+ message.orderBy = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListKeyRingsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListKeyRingsRequest} ListKeyRingsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeyRingsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListKeyRingsRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListKeyRingsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListKeyRingsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListKeyRingsRequest} ListKeyRingsRequest
+ */
+ ListKeyRingsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListKeyRingsRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListKeyRingsRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListKeyRingsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {google.cloud.kms.v1.ListKeyRingsRequest} message ListKeyRingsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListKeyRingsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ object.filter = "";
+ object.orderBy = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ return object;
+ };
+
+ /**
+ * Converts this ListKeyRingsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListKeyRingsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListKeyRingsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListKeyRingsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListKeyRingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListKeyRingsRequest";
+ };
+
+ return ListKeyRingsRequest;
+ })();
+
+ v1.ListCryptoKeysRequest = (function() {
+
+ /**
+ * Properties of a ListCryptoKeysRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IListCryptoKeysRequest
+ * @property {string|null} [parent] ListCryptoKeysRequest parent
+ * @property {number|null} [pageSize] ListCryptoKeysRequest pageSize
+ * @property {string|null} [pageToken] ListCryptoKeysRequest pageToken
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|null} [versionView] ListCryptoKeysRequest versionView
+ * @property {string|null} [filter] ListCryptoKeysRequest filter
+ * @property {string|null} [orderBy] ListCryptoKeysRequest orderBy
+ */
+
+ /**
+ * Constructs a new ListCryptoKeysRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListCryptoKeysRequest.
+ * @implements IListCryptoKeysRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest=} [properties] Properties to set
+ */
+ function ListCryptoKeysRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListCryptoKeysRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.parent = "";
+
+ /**
+ * ListCryptoKeysRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.pageSize = 0;
+
+ /**
+ * ListCryptoKeysRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.pageToken = "";
+
+ /**
+ * ListCryptoKeysRequest versionView.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView} versionView
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.versionView = 0;
+
+ /**
+ * ListCryptoKeysRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.filter = "";
+
+ /**
+ * ListCryptoKeysRequest orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ */
+ ListCryptoKeysRequest.prototype.orderBy = "";
+
+ /**
+ * Creates a new ListCryptoKeysRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListCryptoKeysRequest} ListCryptoKeysRequest instance
+ */
+ ListCryptoKeysRequest.create = function create(properties) {
+ return new ListCryptoKeysRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeysRequest message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest} message ListCryptoKeysRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeysRequest.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.versionView != null && Object.hasOwnProperty.call(message, "versionView"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.versionView);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeysRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysRequest} message ListCryptoKeysRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeysRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListCryptoKeysRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListCryptoKeysRequest} ListCryptoKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeysRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListCryptoKeysRequest();
+ 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.versionView = reader.int32();
+ break;
+ }
+ case 5: {
+ message.filter = reader.string();
+ break;
+ }
+ case 6: {
+ message.orderBy = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListCryptoKeysRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListCryptoKeysRequest} ListCryptoKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeysRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListCryptoKeysRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListCryptoKeysRequest.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.versionView != null && message.hasOwnProperty("versionView"))
+ switch (message.versionView) {
+ default:
+ return "versionView: enum value expected";
+ case 0:
+ case 1:
+ break;
+ }
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListCryptoKeysRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListCryptoKeysRequest} ListCryptoKeysRequest
+ */
+ ListCryptoKeysRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListCryptoKeysRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListCryptoKeysRequest();
+ 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.versionView) {
+ default:
+ if (typeof object.versionView === "number") {
+ message.versionView = object.versionView;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED":
+ case 0:
+ message.versionView = 0;
+ break;
+ case "FULL":
+ case 1:
+ message.versionView = 1;
+ break;
+ }
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListCryptoKeysRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {google.cloud.kms.v1.ListCryptoKeysRequest} message ListCryptoKeysRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListCryptoKeysRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ object.versionView = options.enums === String ? "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED" : 0;
+ object.filter = "";
+ object.orderBy = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.versionView != null && message.hasOwnProperty("versionView"))
+ object.versionView = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView[message.versionView] === undefined ? message.versionView : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView[message.versionView] : message.versionView;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ return object;
+ };
+
+ /**
+ * Converts this ListCryptoKeysRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListCryptoKeysRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListCryptoKeysRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListCryptoKeysRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListCryptoKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListCryptoKeysRequest";
+ };
+
+ return ListCryptoKeysRequest;
+ })();
+
+ v1.ListCryptoKeyVersionsRequest = (function() {
+
+ /**
+ * Properties of a ListCryptoKeyVersionsRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IListCryptoKeyVersionsRequest
+ * @property {string|null} [parent] ListCryptoKeyVersionsRequest parent
+ * @property {number|null} [pageSize] ListCryptoKeyVersionsRequest pageSize
+ * @property {string|null} [pageToken] ListCryptoKeyVersionsRequest pageToken
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView|null} [view] ListCryptoKeyVersionsRequest view
+ * @property {string|null} [filter] ListCryptoKeyVersionsRequest filter
+ * @property {string|null} [orderBy] ListCryptoKeyVersionsRequest orderBy
+ */
+
+ /**
+ * Constructs a new ListCryptoKeyVersionsRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListCryptoKeyVersionsRequest.
+ * @implements IListCryptoKeyVersionsRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest=} [properties] Properties to set
+ */
+ function ListCryptoKeyVersionsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListCryptoKeyVersionsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.parent = "";
+
+ /**
+ * ListCryptoKeyVersionsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListCryptoKeyVersionsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.pageToken = "";
+
+ /**
+ * ListCryptoKeyVersionsRequest view.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView} view
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.view = 0;
+
+ /**
+ * ListCryptoKeyVersionsRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.filter = "";
+
+ /**
+ * ListCryptoKeyVersionsRequest orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ */
+ ListCryptoKeyVersionsRequest.prototype.orderBy = "";
+
+ /**
+ * Creates a new ListCryptoKeyVersionsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsRequest} ListCryptoKeyVersionsRequest instance
+ */
+ ListCryptoKeyVersionsRequest.create = function create(properties) {
+ return new ListCryptoKeyVersionsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest} message ListCryptoKeyVersionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeyVersionsRequest.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);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsRequest} message ListCryptoKeyVersionsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeyVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListCryptoKeyVersionsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsRequest} ListCryptoKeyVersionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeyVersionsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListCryptoKeyVersionsRequest();
+ 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;
+ }
+ case 5: {
+ message.filter = reader.string();
+ break;
+ }
+ case 6: {
+ message.orderBy = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListCryptoKeyVersionsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsRequest} ListCryptoKeyVersionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeyVersionsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListCryptoKeyVersionsRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListCryptoKeyVersionsRequest.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:
+ break;
+ }
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListCryptoKeyVersionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsRequest} ListCryptoKeyVersionsRequest
+ */
+ ListCryptoKeyVersionsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListCryptoKeyVersionsRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListCryptoKeyVersionsRequest();
+ 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) {
+ default:
+ if (typeof object.view === "number") {
+ message.view = object.view;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED":
+ case 0:
+ message.view = 0;
+ break;
+ case "FULL":
+ case 1:
+ message.view = 1;
+ break;
+ }
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListCryptoKeyVersionsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {google.cloud.kms.v1.ListCryptoKeyVersionsRequest} message ListCryptoKeyVersionsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListCryptoKeyVersionsRequest.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 ? "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED" : 0;
+ object.filter = "";
+ object.orderBy = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.view != null && message.hasOwnProperty("view"))
+ object.view = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView[message.view] === undefined ? message.view : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView[message.view] : message.view;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ return object;
+ };
+
+ /**
+ * Converts this ListCryptoKeyVersionsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListCryptoKeyVersionsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListCryptoKeyVersionsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListCryptoKeyVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListCryptoKeyVersionsRequest";
+ };
+
+ return ListCryptoKeyVersionsRequest;
+ })();
+
+ v1.ListImportJobsRequest = (function() {
+
+ /**
+ * Properties of a ListImportJobsRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IListImportJobsRequest
+ * @property {string|null} [parent] ListImportJobsRequest parent
+ * @property {number|null} [pageSize] ListImportJobsRequest pageSize
+ * @property {string|null} [pageToken] ListImportJobsRequest pageToken
+ * @property {string|null} [filter] ListImportJobsRequest filter
+ * @property {string|null} [orderBy] ListImportJobsRequest orderBy
+ */
+
+ /**
+ * Constructs a new ListImportJobsRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListImportJobsRequest.
+ * @implements IListImportJobsRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IListImportJobsRequest=} [properties] Properties to set
+ */
+ function ListImportJobsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListImportJobsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ */
+ ListImportJobsRequest.prototype.parent = "";
+
+ /**
+ * ListImportJobsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ */
+ ListImportJobsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListImportJobsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ */
+ ListImportJobsRequest.prototype.pageToken = "";
+
+ /**
+ * ListImportJobsRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ */
+ ListImportJobsRequest.prototype.filter = "";
+
+ /**
+ * ListImportJobsRequest orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ */
+ ListImportJobsRequest.prototype.orderBy = "";
+
+ /**
+ * Creates a new ListImportJobsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListImportJobsRequest} ListImportJobsRequest instance
+ */
+ ListImportJobsRequest.create = function create(properties) {
+ return new ListImportJobsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListImportJobsRequest message. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsRequest} message ListImportJobsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListImportJobsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListImportJobsRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsRequest} message ListImportJobsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListImportJobsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListImportJobsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListImportJobsRequest} ListImportJobsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListImportJobsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListImportJobsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pageToken = reader.string();
+ break;
+ }
+ case 4: {
+ message.filter = reader.string();
+ break;
+ }
+ case 5: {
+ message.orderBy = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListImportJobsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListImportJobsRequest} ListImportJobsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListImportJobsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListImportJobsRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListImportJobsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListImportJobsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListImportJobsRequest} ListImportJobsRequest
+ */
+ ListImportJobsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListImportJobsRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListImportJobsRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListImportJobsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {google.cloud.kms.v1.ListImportJobsRequest} message ListImportJobsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListImportJobsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ object.filter = "";
+ object.orderBy = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ return object;
+ };
+
+ /**
+ * Converts this ListImportJobsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListImportJobsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListImportJobsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListImportJobsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListImportJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListImportJobsRequest";
+ };
+
+ return ListImportJobsRequest;
+ })();
+
+ v1.ListKeyRingsResponse = (function() {
+
+ /**
+ * Properties of a ListKeyRingsResponse.
+ * @memberof google.cloud.kms.v1
+ * @interface IListKeyRingsResponse
+ * @property {Array.|null} [keyRings] ListKeyRingsResponse keyRings
+ * @property {string|null} [nextPageToken] ListKeyRingsResponse nextPageToken
+ * @property {number|null} [totalSize] ListKeyRingsResponse totalSize
+ */
+
+ /**
+ * Constructs a new ListKeyRingsResponse.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListKeyRingsResponse.
+ * @implements IListKeyRingsResponse
+ * @constructor
+ * @param {google.cloud.kms.v1.IListKeyRingsResponse=} [properties] Properties to set
+ */
+ function ListKeyRingsResponse(properties) {
+ this.keyRings = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListKeyRingsResponse keyRings.
+ * @member {Array.} keyRings
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @instance
+ */
+ ListKeyRingsResponse.prototype.keyRings = $util.emptyArray;
+
+ /**
+ * ListKeyRingsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @instance
+ */
+ ListKeyRingsResponse.prototype.nextPageToken = "";
+
+ /**
+ * ListKeyRingsResponse totalSize.
+ * @member {number} totalSize
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @instance
+ */
+ ListKeyRingsResponse.prototype.totalSize = 0;
+
+ /**
+ * Creates a new ListKeyRingsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsResponse=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListKeyRingsResponse} ListKeyRingsResponse instance
+ */
+ ListKeyRingsResponse.create = function create(properties) {
+ return new ListKeyRingsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListKeyRingsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsResponse} message ListKeyRingsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeyRingsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.keyRings != null && message.keyRings.length)
+ for (var i = 0; i < message.keyRings.length; ++i)
+ $root.google.cloud.kms.v1.KeyRing.encode(message.keyRings[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListKeyRingsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListKeyRingsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListKeyRingsResponse} message ListKeyRingsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeyRingsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListKeyRingsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListKeyRingsResponse} ListKeyRingsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeyRingsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListKeyRingsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.keyRings && message.keyRings.length))
+ message.keyRings = [];
+ message.keyRings.push($root.google.cloud.kms.v1.KeyRing.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.totalSize = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListKeyRingsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListKeyRingsResponse} ListKeyRingsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeyRingsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListKeyRingsResponse message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListKeyRingsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.keyRings != null && message.hasOwnProperty("keyRings")) {
+ if (!Array.isArray(message.keyRings))
+ return "keyRings: array expected";
+ for (var i = 0; i < message.keyRings.length; ++i) {
+ var error = $root.google.cloud.kms.v1.KeyRing.verify(message.keyRings[i]);
+ if (error)
+ return "keyRings." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ if (!$util.isInteger(message.totalSize))
+ return "totalSize: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListKeyRingsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListKeyRingsResponse} ListKeyRingsResponse
+ */
+ ListKeyRingsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListKeyRingsResponse)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListKeyRingsResponse();
+ if (object.keyRings) {
+ if (!Array.isArray(object.keyRings))
+ throw TypeError(".google.cloud.kms.v1.ListKeyRingsResponse.keyRings: array expected");
+ message.keyRings = [];
+ for (var i = 0; i < object.keyRings.length; ++i) {
+ if (typeof object.keyRings[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.ListKeyRingsResponse.keyRings: object expected");
+ message.keyRings[i] = $root.google.cloud.kms.v1.KeyRing.fromObject(object.keyRings[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ if (object.totalSize != null)
+ message.totalSize = object.totalSize | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListKeyRingsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {google.cloud.kms.v1.ListKeyRingsResponse} message ListKeyRingsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListKeyRingsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.keyRings = [];
+ if (options.defaults) {
+ object.nextPageToken = "";
+ object.totalSize = 0;
+ }
+ if (message.keyRings && message.keyRings.length) {
+ object.keyRings = [];
+ for (var j = 0; j < message.keyRings.length; ++j)
+ object.keyRings[j] = $root.google.cloud.kms.v1.KeyRing.toObject(message.keyRings[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ object.totalSize = message.totalSize;
+ return object;
+ };
+
+ /**
+ * Converts this ListKeyRingsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListKeyRingsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListKeyRingsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListKeyRingsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListKeyRingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListKeyRingsResponse";
+ };
+
+ return ListKeyRingsResponse;
+ })();
+
+ v1.ListCryptoKeysResponse = (function() {
+
+ /**
+ * Properties of a ListCryptoKeysResponse.
+ * @memberof google.cloud.kms.v1
+ * @interface IListCryptoKeysResponse
+ * @property {Array.|null} [cryptoKeys] ListCryptoKeysResponse cryptoKeys
+ * @property {string|null} [nextPageToken] ListCryptoKeysResponse nextPageToken
+ * @property {number|null} [totalSize] ListCryptoKeysResponse totalSize
+ */
+
+ /**
+ * Constructs a new ListCryptoKeysResponse.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListCryptoKeysResponse.
+ * @implements IListCryptoKeysResponse
+ * @constructor
+ * @param {google.cloud.kms.v1.IListCryptoKeysResponse=} [properties] Properties to set
+ */
+ function ListCryptoKeysResponse(properties) {
+ this.cryptoKeys = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListCryptoKeysResponse cryptoKeys.
+ * @member {Array.} cryptoKeys
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @instance
+ */
+ ListCryptoKeysResponse.prototype.cryptoKeys = $util.emptyArray;
+
+ /**
+ * ListCryptoKeysResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @instance
+ */
+ ListCryptoKeysResponse.prototype.nextPageToken = "";
+
+ /**
+ * ListCryptoKeysResponse totalSize.
+ * @member {number} totalSize
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @instance
+ */
+ ListCryptoKeysResponse.prototype.totalSize = 0;
+
+ /**
+ * Creates a new ListCryptoKeysResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysResponse=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListCryptoKeysResponse} ListCryptoKeysResponse instance
+ */
+ ListCryptoKeysResponse.create = function create(properties) {
+ return new ListCryptoKeysResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeysResponse message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysResponse} message ListCryptoKeysResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeysResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cryptoKeys != null && message.cryptoKeys.length)
+ for (var i = 0; i < message.cryptoKeys.length; ++i)
+ $root.google.cloud.kms.v1.CryptoKey.encode(message.cryptoKeys[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeysResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeysResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeysResponse} message ListCryptoKeysResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeysResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListCryptoKeysResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListCryptoKeysResponse} ListCryptoKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeysResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListCryptoKeysResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.cryptoKeys && message.cryptoKeys.length))
+ message.cryptoKeys = [];
+ message.cryptoKeys.push($root.google.cloud.kms.v1.CryptoKey.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.totalSize = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListCryptoKeysResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListCryptoKeysResponse} ListCryptoKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeysResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListCryptoKeysResponse message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListCryptoKeysResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cryptoKeys != null && message.hasOwnProperty("cryptoKeys")) {
+ if (!Array.isArray(message.cryptoKeys))
+ return "cryptoKeys: array expected";
+ for (var i = 0; i < message.cryptoKeys.length; ++i) {
+ var error = $root.google.cloud.kms.v1.CryptoKey.verify(message.cryptoKeys[i]);
+ if (error)
+ return "cryptoKeys." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ if (!$util.isInteger(message.totalSize))
+ return "totalSize: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListCryptoKeysResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListCryptoKeysResponse} ListCryptoKeysResponse
+ */
+ ListCryptoKeysResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListCryptoKeysResponse)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListCryptoKeysResponse();
+ if (object.cryptoKeys) {
+ if (!Array.isArray(object.cryptoKeys))
+ throw TypeError(".google.cloud.kms.v1.ListCryptoKeysResponse.cryptoKeys: array expected");
+ message.cryptoKeys = [];
+ for (var i = 0; i < object.cryptoKeys.length; ++i) {
+ if (typeof object.cryptoKeys[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.ListCryptoKeysResponse.cryptoKeys: object expected");
+ message.cryptoKeys[i] = $root.google.cloud.kms.v1.CryptoKey.fromObject(object.cryptoKeys[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ if (object.totalSize != null)
+ message.totalSize = object.totalSize | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListCryptoKeysResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {google.cloud.kms.v1.ListCryptoKeysResponse} message ListCryptoKeysResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListCryptoKeysResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.cryptoKeys = [];
+ if (options.defaults) {
+ object.nextPageToken = "";
+ object.totalSize = 0;
+ }
+ if (message.cryptoKeys && message.cryptoKeys.length) {
+ object.cryptoKeys = [];
+ for (var j = 0; j < message.cryptoKeys.length; ++j)
+ object.cryptoKeys[j] = $root.google.cloud.kms.v1.CryptoKey.toObject(message.cryptoKeys[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ object.totalSize = message.totalSize;
+ return object;
+ };
+
+ /**
+ * Converts this ListCryptoKeysResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListCryptoKeysResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListCryptoKeysResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListCryptoKeysResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListCryptoKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListCryptoKeysResponse";
+ };
+
+ return ListCryptoKeysResponse;
+ })();
+
+ v1.ListCryptoKeyVersionsResponse = (function() {
+
+ /**
+ * Properties of a ListCryptoKeyVersionsResponse.
+ * @memberof google.cloud.kms.v1
+ * @interface IListCryptoKeyVersionsResponse
+ * @property {Array.|null} [cryptoKeyVersions] ListCryptoKeyVersionsResponse cryptoKeyVersions
+ * @property {string|null} [nextPageToken] ListCryptoKeyVersionsResponse nextPageToken
+ * @property {number|null} [totalSize] ListCryptoKeyVersionsResponse totalSize
+ */
+
+ /**
+ * Constructs a new ListCryptoKeyVersionsResponse.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListCryptoKeyVersionsResponse.
+ * @implements IListCryptoKeyVersionsResponse
+ * @constructor
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsResponse=} [properties] Properties to set
+ */
+ function ListCryptoKeyVersionsResponse(properties) {
+ this.cryptoKeyVersions = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListCryptoKeyVersionsResponse cryptoKeyVersions.
+ * @member {Array.} cryptoKeyVersions
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @instance
+ */
+ ListCryptoKeyVersionsResponse.prototype.cryptoKeyVersions = $util.emptyArray;
+
+ /**
+ * ListCryptoKeyVersionsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @instance
+ */
+ ListCryptoKeyVersionsResponse.prototype.nextPageToken = "";
+
+ /**
+ * ListCryptoKeyVersionsResponse totalSize.
+ * @member {number} totalSize
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @instance
+ */
+ ListCryptoKeyVersionsResponse.prototype.totalSize = 0;
+
+ /**
+ * Creates a new ListCryptoKeyVersionsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsResponse=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} ListCryptoKeyVersionsResponse instance
+ */
+ ListCryptoKeyVersionsResponse.create = function create(properties) {
+ return new ListCryptoKeyVersionsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsResponse} message ListCryptoKeyVersionsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeyVersionsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cryptoKeyVersions != null && message.cryptoKeyVersions.length)
+ for (var i = 0; i < message.cryptoKeyVersions.length; ++i)
+ $root.google.cloud.kms.v1.CryptoKeyVersion.encode(message.cryptoKeyVersions[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListCryptoKeyVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListCryptoKeyVersionsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListCryptoKeyVersionsResponse} message ListCryptoKeyVersionsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListCryptoKeyVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListCryptoKeyVersionsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} ListCryptoKeyVersionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeyVersionsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListCryptoKeyVersionsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.cryptoKeyVersions && message.cryptoKeyVersions.length))
+ message.cryptoKeyVersions = [];
+ message.cryptoKeyVersions.push($root.google.cloud.kms.v1.CryptoKeyVersion.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.totalSize = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListCryptoKeyVersionsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} ListCryptoKeyVersionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListCryptoKeyVersionsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListCryptoKeyVersionsResponse message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListCryptoKeyVersionsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cryptoKeyVersions != null && message.hasOwnProperty("cryptoKeyVersions")) {
+ if (!Array.isArray(message.cryptoKeyVersions))
+ return "cryptoKeyVersions: array expected";
+ for (var i = 0; i < message.cryptoKeyVersions.length; ++i) {
+ var error = $root.google.cloud.kms.v1.CryptoKeyVersion.verify(message.cryptoKeyVersions[i]);
+ if (error)
+ return "cryptoKeyVersions." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ if (!$util.isInteger(message.totalSize))
+ return "totalSize: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListCryptoKeyVersionsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} ListCryptoKeyVersionsResponse
+ */
+ ListCryptoKeyVersionsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListCryptoKeyVersionsResponse)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListCryptoKeyVersionsResponse();
+ if (object.cryptoKeyVersions) {
+ if (!Array.isArray(object.cryptoKeyVersions))
+ throw TypeError(".google.cloud.kms.v1.ListCryptoKeyVersionsResponse.cryptoKeyVersions: array expected");
+ message.cryptoKeyVersions = [];
+ for (var i = 0; i < object.cryptoKeyVersions.length; ++i) {
+ if (typeof object.cryptoKeyVersions[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.ListCryptoKeyVersionsResponse.cryptoKeyVersions: object expected");
+ message.cryptoKeyVersions[i] = $root.google.cloud.kms.v1.CryptoKeyVersion.fromObject(object.cryptoKeyVersions[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ if (object.totalSize != null)
+ message.totalSize = object.totalSize | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListCryptoKeyVersionsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {google.cloud.kms.v1.ListCryptoKeyVersionsResponse} message ListCryptoKeyVersionsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListCryptoKeyVersionsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.cryptoKeyVersions = [];
+ if (options.defaults) {
+ object.nextPageToken = "";
+ object.totalSize = 0;
+ }
+ if (message.cryptoKeyVersions && message.cryptoKeyVersions.length) {
+ object.cryptoKeyVersions = [];
+ for (var j = 0; j < message.cryptoKeyVersions.length; ++j)
+ object.cryptoKeyVersions[j] = $root.google.cloud.kms.v1.CryptoKeyVersion.toObject(message.cryptoKeyVersions[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ object.totalSize = message.totalSize;
+ return object;
+ };
+
+ /**
+ * Converts this ListCryptoKeyVersionsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListCryptoKeyVersionsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListCryptoKeyVersionsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListCryptoKeyVersionsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListCryptoKeyVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListCryptoKeyVersionsResponse";
+ };
+
+ return ListCryptoKeyVersionsResponse;
+ })();
+
+ v1.ListImportJobsResponse = (function() {
+
+ /**
+ * Properties of a ListImportJobsResponse.
+ * @memberof google.cloud.kms.v1
+ * @interface IListImportJobsResponse
+ * @property {Array.|null} [importJobs] ListImportJobsResponse importJobs
+ * @property {string|null} [nextPageToken] ListImportJobsResponse nextPageToken
+ * @property {number|null} [totalSize] ListImportJobsResponse totalSize
+ */
+
+ /**
+ * Constructs a new ListImportJobsResponse.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a ListImportJobsResponse.
+ * @implements IListImportJobsResponse
+ * @constructor
+ * @param {google.cloud.kms.v1.IListImportJobsResponse=} [properties] Properties to set
+ */
+ function ListImportJobsResponse(properties) {
+ this.importJobs = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListImportJobsResponse importJobs.
+ * @member {Array.} importJobs
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @instance
+ */
+ ListImportJobsResponse.prototype.importJobs = $util.emptyArray;
+
+ /**
+ * ListImportJobsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @instance
+ */
+ ListImportJobsResponse.prototype.nextPageToken = "";
+
+ /**
+ * ListImportJobsResponse totalSize.
+ * @member {number} totalSize
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @instance
+ */
+ ListImportJobsResponse.prototype.totalSize = 0;
+
+ /**
+ * Creates a new ListImportJobsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsResponse=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ListImportJobsResponse} ListImportJobsResponse instance
+ */
+ ListImportJobsResponse.create = function create(properties) {
+ return new ListImportJobsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListImportJobsResponse message. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsResponse} message ListImportJobsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListImportJobsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.importJobs != null && message.importJobs.length)
+ for (var i = 0; i < message.importJobs.length; ++i)
+ $root.google.cloud.kms.v1.ImportJob.encode(message.importJobs[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.totalSize != null && Object.hasOwnProperty.call(message, "totalSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListImportJobsResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ListImportJobsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {google.cloud.kms.v1.IListImportJobsResponse} message ListImportJobsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListImportJobsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListImportJobsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ListImportJobsResponse} ListImportJobsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListImportJobsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ListImportJobsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.importJobs && message.importJobs.length))
+ message.importJobs = [];
+ message.importJobs.push($root.google.cloud.kms.v1.ImportJob.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.totalSize = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListImportJobsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ListImportJobsResponse} ListImportJobsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListImportJobsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListImportJobsResponse message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListImportJobsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.importJobs != null && message.hasOwnProperty("importJobs")) {
+ if (!Array.isArray(message.importJobs))
+ return "importJobs: array expected";
+ for (var i = 0; i < message.importJobs.length; ++i) {
+ var error = $root.google.cloud.kms.v1.ImportJob.verify(message.importJobs[i]);
+ if (error)
+ return "importJobs." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ if (!$util.isInteger(message.totalSize))
+ return "totalSize: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListImportJobsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ListImportJobsResponse} ListImportJobsResponse
+ */
+ ListImportJobsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ListImportJobsResponse)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ListImportJobsResponse();
+ if (object.importJobs) {
+ if (!Array.isArray(object.importJobs))
+ throw TypeError(".google.cloud.kms.v1.ListImportJobsResponse.importJobs: array expected");
+ message.importJobs = [];
+ for (var i = 0; i < object.importJobs.length; ++i) {
+ if (typeof object.importJobs[i] !== "object")
+ throw TypeError(".google.cloud.kms.v1.ListImportJobsResponse.importJobs: object expected");
+ message.importJobs[i] = $root.google.cloud.kms.v1.ImportJob.fromObject(object.importJobs[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ if (object.totalSize != null)
+ message.totalSize = object.totalSize | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListImportJobsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {google.cloud.kms.v1.ListImportJobsResponse} message ListImportJobsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListImportJobsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.importJobs = [];
+ if (options.defaults) {
+ object.nextPageToken = "";
+ object.totalSize = 0;
+ }
+ if (message.importJobs && message.importJobs.length) {
+ object.importJobs = [];
+ for (var j = 0; j < message.importJobs.length; ++j)
+ object.importJobs[j] = $root.google.cloud.kms.v1.ImportJob.toObject(message.importJobs[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ if (message.totalSize != null && message.hasOwnProperty("totalSize"))
+ object.totalSize = message.totalSize;
+ return object;
+ };
+
+ /**
+ * Converts this ListImportJobsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListImportJobsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListImportJobsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ListImportJobsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListImportJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ListImportJobsResponse";
+ };
+
+ return ListImportJobsResponse;
+ })();
+
+ v1.GetKeyRingRequest = (function() {
+
+ /**
+ * Properties of a GetKeyRingRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetKeyRingRequest
+ * @property {string|null} [name] GetKeyRingRequest name
+ */
+
+ /**
+ * Constructs a new GetKeyRingRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetKeyRingRequest.
+ * @implements IGetKeyRingRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest=} [properties] Properties to set
+ */
+ function GetKeyRingRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetKeyRingRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @instance
+ */
+ GetKeyRingRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetKeyRingRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetKeyRingRequest} GetKeyRingRequest instance
+ */
+ GetKeyRingRequest.create = function create(properties) {
+ return new GetKeyRingRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetKeyRingRequest message. Does not implicitly {@link google.cloud.kms.v1.GetKeyRingRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest} message GetKeyRingRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetKeyRingRequest.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 GetKeyRingRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetKeyRingRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetKeyRingRequest} message GetKeyRingRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetKeyRingRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetKeyRingRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetKeyRingRequest} GetKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetKeyRingRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetKeyRingRequest();
+ 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 GetKeyRingRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetKeyRingRequest} GetKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetKeyRingRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetKeyRingRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetKeyRingRequest.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 GetKeyRingRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetKeyRingRequest} GetKeyRingRequest
+ */
+ GetKeyRingRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetKeyRingRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetKeyRingRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetKeyRingRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetKeyRingRequest} message GetKeyRingRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetKeyRingRequest.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 GetKeyRingRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetKeyRingRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetKeyRingRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetKeyRingRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetKeyRingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetKeyRingRequest";
+ };
+
+ return GetKeyRingRequest;
+ })();
+
+ v1.GetCryptoKeyRequest = (function() {
+
+ /**
+ * Properties of a GetCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetCryptoKeyRequest
+ * @property {string|null} [name] GetCryptoKeyRequest name
+ */
+
+ /**
+ * Constructs a new GetCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetCryptoKeyRequest.
+ * @implements IGetCryptoKeyRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest=} [properties] Properties to set
+ */
+ function GetCryptoKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetCryptoKeyRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @instance
+ */
+ GetCryptoKeyRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetCryptoKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetCryptoKeyRequest} GetCryptoKeyRequest instance
+ */
+ GetCryptoKeyRequest.create = function create(properties) {
+ return new GetCryptoKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest} message GetCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetCryptoKeyRequest.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 GetCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyRequest} message GetCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetCryptoKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetCryptoKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetCryptoKeyRequest} GetCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetCryptoKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetCryptoKeyRequest();
+ 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 GetCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetCryptoKeyRequest} GetCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetCryptoKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetCryptoKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetCryptoKeyRequest.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 GetCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetCryptoKeyRequest} GetCryptoKeyRequest
+ */
+ GetCryptoKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetCryptoKeyRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetCryptoKeyRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetCryptoKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetCryptoKeyRequest} message GetCryptoKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetCryptoKeyRequest.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 GetCryptoKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetCryptoKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetCryptoKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetCryptoKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetCryptoKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetCryptoKeyRequest";
+ };
+
+ return GetCryptoKeyRequest;
+ })();
+
+ v1.GetCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of a GetCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetCryptoKeyVersionRequest
+ * @property {string|null} [name] GetCryptoKeyVersionRequest name
+ */
+
+ /**
+ * Constructs a new GetCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetCryptoKeyVersionRequest.
+ * @implements IGetCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function GetCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetCryptoKeyVersionRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @instance
+ */
+ GetCryptoKeyVersionRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetCryptoKeyVersionRequest} GetCryptoKeyVersionRequest instance
+ */
+ GetCryptoKeyVersionRequest.create = function create(properties) {
+ return new GetCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest} message GetCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetCryptoKeyVersionRequest.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 GetCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetCryptoKeyVersionRequest} message GetCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetCryptoKeyVersionRequest} GetCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetCryptoKeyVersionRequest();
+ 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 GetCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetCryptoKeyVersionRequest} GetCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetCryptoKeyVersionRequest.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 GetCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetCryptoKeyVersionRequest} GetCryptoKeyVersionRequest
+ */
+ GetCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetCryptoKeyVersionRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetCryptoKeyVersionRequest} message GetCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetCryptoKeyVersionRequest.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 GetCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetCryptoKeyVersionRequest";
+ };
+
+ return GetCryptoKeyVersionRequest;
+ })();
+
+ v1.GetPublicKeyRequest = (function() {
+
+ /**
+ * Properties of a GetPublicKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetPublicKeyRequest
+ * @property {string|null} [name] GetPublicKeyRequest name
+ */
+
+ /**
+ * Constructs a new GetPublicKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetPublicKeyRequest.
+ * @implements IGetPublicKeyRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest=} [properties] Properties to set
+ */
+ function GetPublicKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetPublicKeyRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @instance
+ */
+ GetPublicKeyRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetPublicKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetPublicKeyRequest} GetPublicKeyRequest instance
+ */
+ GetPublicKeyRequest.create = function create(properties) {
+ return new GetPublicKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetPublicKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.GetPublicKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest} message GetPublicKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetPublicKeyRequest.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 GetPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetPublicKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetPublicKeyRequest} message GetPublicKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetPublicKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetPublicKeyRequest} GetPublicKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetPublicKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetPublicKeyRequest();
+ 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 GetPublicKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetPublicKeyRequest} GetPublicKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetPublicKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetPublicKeyRequest.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 GetPublicKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetPublicKeyRequest} GetPublicKeyRequest
+ */
+ GetPublicKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetPublicKeyRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetPublicKeyRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetPublicKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetPublicKeyRequest} message GetPublicKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetPublicKeyRequest.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 GetPublicKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetPublicKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetPublicKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetPublicKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetPublicKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetPublicKeyRequest";
+ };
+
+ return GetPublicKeyRequest;
+ })();
+
+ v1.GetImportJobRequest = (function() {
+
+ /**
+ * Properties of a GetImportJobRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IGetImportJobRequest
+ * @property {string|null} [name] GetImportJobRequest name
+ */
+
+ /**
+ * Constructs a new GetImportJobRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a GetImportJobRequest.
+ * @implements IGetImportJobRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IGetImportJobRequest=} [properties] Properties to set
+ */
+ function GetImportJobRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetImportJobRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @instance
+ */
+ GetImportJobRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetImportJobRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetImportJobRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.GetImportJobRequest} GetImportJobRequest instance
+ */
+ GetImportJobRequest.create = function create(properties) {
+ return new GetImportJobRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetImportJobRequest message. Does not implicitly {@link google.cloud.kms.v1.GetImportJobRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetImportJobRequest} message GetImportJobRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetImportJobRequest.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 GetImportJobRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.GetImportJobRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.IGetImportJobRequest} message GetImportJobRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetImportJobRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetImportJobRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.GetImportJobRequest} GetImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetImportJobRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.GetImportJobRequest();
+ 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 GetImportJobRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.GetImportJobRequest} GetImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetImportJobRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetImportJobRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetImportJobRequest.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 GetImportJobRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.GetImportJobRequest} GetImportJobRequest
+ */
+ GetImportJobRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.GetImportJobRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.GetImportJobRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetImportJobRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.GetImportJobRequest} message GetImportJobRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetImportJobRequest.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 GetImportJobRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetImportJobRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetImportJobRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.GetImportJobRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetImportJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.GetImportJobRequest";
+ };
+
+ return GetImportJobRequest;
+ })();
+
+ v1.CreateKeyRingRequest = (function() {
+
+ /**
+ * Properties of a CreateKeyRingRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface ICreateKeyRingRequest
+ * @property {string|null} [parent] CreateKeyRingRequest parent
+ * @property {string|null} [keyRingId] CreateKeyRingRequest keyRingId
+ * @property {google.cloud.kms.v1.IKeyRing|null} [keyRing] CreateKeyRingRequest keyRing
+ */
+
+ /**
+ * Constructs a new CreateKeyRingRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CreateKeyRingRequest.
+ * @implements ICreateKeyRingRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest=} [properties] Properties to set
+ */
+ function CreateKeyRingRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateKeyRingRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @instance
+ */
+ CreateKeyRingRequest.prototype.parent = "";
+
+ /**
+ * CreateKeyRingRequest keyRingId.
+ * @member {string} keyRingId
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @instance
+ */
+ CreateKeyRingRequest.prototype.keyRingId = "";
+
+ /**
+ * CreateKeyRingRequest keyRing.
+ * @member {google.cloud.kms.v1.IKeyRing|null|undefined} keyRing
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @instance
+ */
+ CreateKeyRingRequest.prototype.keyRing = null;
+
+ /**
+ * Creates a new CreateKeyRingRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CreateKeyRingRequest} CreateKeyRingRequest instance
+ */
+ CreateKeyRingRequest.create = function create(properties) {
+ return new CreateKeyRingRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateKeyRingRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateKeyRingRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest} message CreateKeyRingRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateKeyRingRequest.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.keyRingId != null && Object.hasOwnProperty.call(message, "keyRingId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyRingId);
+ if (message.keyRing != null && Object.hasOwnProperty.call(message, "keyRing"))
+ $root.google.cloud.kms.v1.KeyRing.encode(message.keyRing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateKeyRingRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateKeyRingRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateKeyRingRequest} message CreateKeyRingRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateKeyRingRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateKeyRingRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CreateKeyRingRequest} CreateKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateKeyRingRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CreateKeyRingRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.keyRingId = reader.string();
+ break;
+ }
+ case 3: {
+ message.keyRing = $root.google.cloud.kms.v1.KeyRing.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateKeyRingRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CreateKeyRingRequest} CreateKeyRingRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateKeyRingRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateKeyRingRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateKeyRingRequest.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.keyRingId != null && message.hasOwnProperty("keyRingId"))
+ if (!$util.isString(message.keyRingId))
+ return "keyRingId: string expected";
+ if (message.keyRing != null && message.hasOwnProperty("keyRing")) {
+ var error = $root.google.cloud.kms.v1.KeyRing.verify(message.keyRing);
+ if (error)
+ return "keyRing." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateKeyRingRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CreateKeyRingRequest} CreateKeyRingRequest
+ */
+ CreateKeyRingRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CreateKeyRingRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CreateKeyRingRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.keyRingId != null)
+ message.keyRingId = String(object.keyRingId);
+ if (object.keyRing != null) {
+ if (typeof object.keyRing !== "object")
+ throw TypeError(".google.cloud.kms.v1.CreateKeyRingRequest.keyRing: object expected");
+ message.keyRing = $root.google.cloud.kms.v1.KeyRing.fromObject(object.keyRing);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateKeyRingRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {google.cloud.kms.v1.CreateKeyRingRequest} message CreateKeyRingRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateKeyRingRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.keyRingId = "";
+ object.keyRing = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.keyRingId != null && message.hasOwnProperty("keyRingId"))
+ object.keyRingId = message.keyRingId;
+ if (message.keyRing != null && message.hasOwnProperty("keyRing"))
+ object.keyRing = $root.google.cloud.kms.v1.KeyRing.toObject(message.keyRing, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateKeyRingRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateKeyRingRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateKeyRingRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CreateKeyRingRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateKeyRingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CreateKeyRingRequest";
+ };
+
+ return CreateKeyRingRequest;
+ })();
+
+ v1.CreateCryptoKeyRequest = (function() {
+
+ /**
+ * Properties of a CreateCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface ICreateCryptoKeyRequest
+ * @property {string|null} [parent] CreateCryptoKeyRequest parent
+ * @property {string|null} [cryptoKeyId] CreateCryptoKeyRequest cryptoKeyId
+ * @property {google.cloud.kms.v1.ICryptoKey|null} [cryptoKey] CreateCryptoKeyRequest cryptoKey
+ * @property {boolean|null} [skipInitialVersionCreation] CreateCryptoKeyRequest skipInitialVersionCreation
+ */
+
+ /**
+ * Constructs a new CreateCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CreateCryptoKeyRequest.
+ * @implements ICreateCryptoKeyRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest=} [properties] Properties to set
+ */
+ function CreateCryptoKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateCryptoKeyRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @instance
+ */
+ CreateCryptoKeyRequest.prototype.parent = "";
+
+ /**
+ * CreateCryptoKeyRequest cryptoKeyId.
+ * @member {string} cryptoKeyId
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @instance
+ */
+ CreateCryptoKeyRequest.prototype.cryptoKeyId = "";
+
+ /**
+ * CreateCryptoKeyRequest cryptoKey.
+ * @member {google.cloud.kms.v1.ICryptoKey|null|undefined} cryptoKey
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @instance
+ */
+ CreateCryptoKeyRequest.prototype.cryptoKey = null;
+
+ /**
+ * CreateCryptoKeyRequest skipInitialVersionCreation.
+ * @member {boolean} skipInitialVersionCreation
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @instance
+ */
+ CreateCryptoKeyRequest.prototype.skipInitialVersionCreation = false;
+
+ /**
+ * Creates a new CreateCryptoKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyRequest} CreateCryptoKeyRequest instance
+ */
+ CreateCryptoKeyRequest.create = function create(properties) {
+ return new CreateCryptoKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest} message CreateCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateCryptoKeyRequest.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.cryptoKeyId != null && Object.hasOwnProperty.call(message, "cryptoKeyId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyId);
+ if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
+ $root.google.cloud.kms.v1.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.skipInitialVersionCreation != null && Object.hasOwnProperty.call(message, "skipInitialVersionCreation"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipInitialVersionCreation);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyRequest} message CreateCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateCryptoKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateCryptoKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyRequest} CreateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateCryptoKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CreateCryptoKeyRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.cryptoKeyId = reader.string();
+ break;
+ }
+ case 3: {
+ message.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.skipInitialVersionCreation = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyRequest} CreateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateCryptoKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateCryptoKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateCryptoKeyRequest.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.cryptoKeyId != null && message.hasOwnProperty("cryptoKeyId"))
+ if (!$util.isString(message.cryptoKeyId))
+ return "cryptoKeyId: string expected";
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
+ var error = $root.google.cloud.kms.v1.CryptoKey.verify(message.cryptoKey);
+ if (error)
+ return "cryptoKey." + error;
+ }
+ if (message.skipInitialVersionCreation != null && message.hasOwnProperty("skipInitialVersionCreation"))
+ if (typeof message.skipInitialVersionCreation !== "boolean")
+ return "skipInitialVersionCreation: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a CreateCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyRequest} CreateCryptoKeyRequest
+ */
+ CreateCryptoKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CreateCryptoKeyRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CreateCryptoKeyRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.cryptoKeyId != null)
+ message.cryptoKeyId = String(object.cryptoKeyId);
+ if (object.cryptoKey != null) {
+ if (typeof object.cryptoKey !== "object")
+ throw TypeError(".google.cloud.kms.v1.CreateCryptoKeyRequest.cryptoKey: object expected");
+ message.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.fromObject(object.cryptoKey);
+ }
+ if (object.skipInitialVersionCreation != null)
+ message.skipInitialVersionCreation = Boolean(object.skipInitialVersionCreation);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateCryptoKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.CreateCryptoKeyRequest} message CreateCryptoKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateCryptoKeyRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.cryptoKeyId = "";
+ object.cryptoKey = null;
+ object.skipInitialVersionCreation = false;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.cryptoKeyId != null && message.hasOwnProperty("cryptoKeyId"))
+ object.cryptoKeyId = message.cryptoKeyId;
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
+ object.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.toObject(message.cryptoKey, options);
+ if (message.skipInitialVersionCreation != null && message.hasOwnProperty("skipInitialVersionCreation"))
+ object.skipInitialVersionCreation = message.skipInitialVersionCreation;
+ return object;
+ };
+
+ /**
+ * Converts this CreateCryptoKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateCryptoKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateCryptoKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateCryptoKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CreateCryptoKeyRequest";
+ };
+
+ return CreateCryptoKeyRequest;
+ })();
+
+ v1.CreateCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of a CreateCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface ICreateCryptoKeyVersionRequest
+ * @property {string|null} [parent] CreateCryptoKeyVersionRequest parent
+ * @property {google.cloud.kms.v1.ICryptoKeyVersion|null} [cryptoKeyVersion] CreateCryptoKeyVersionRequest cryptoKeyVersion
+ */
+
+ /**
+ * Constructs a new CreateCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CreateCryptoKeyVersionRequest.
+ * @implements ICreateCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function CreateCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateCryptoKeyVersionRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @instance
+ */
+ CreateCryptoKeyVersionRequest.prototype.parent = "";
+
+ /**
+ * CreateCryptoKeyVersionRequest cryptoKeyVersion.
+ * @member {google.cloud.kms.v1.ICryptoKeyVersion|null|undefined} cryptoKeyVersion
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @instance
+ */
+ CreateCryptoKeyVersionRequest.prototype.cryptoKeyVersion = null;
+
+ /**
+ * Creates a new CreateCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyVersionRequest} CreateCryptoKeyVersionRequest instance
+ */
+ CreateCryptoKeyVersionRequest.create = function create(properties) {
+ return new CreateCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest} message CreateCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateCryptoKeyVersionRequest.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.cryptoKeyVersion != null && Object.hasOwnProperty.call(message, "cryptoKeyVersion"))
+ $root.google.cloud.kms.v1.CryptoKeyVersion.encode(message.cryptoKeyVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateCryptoKeyVersionRequest} message CreateCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyVersionRequest} CreateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CreateCryptoKeyVersionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyVersionRequest} CreateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateCryptoKeyVersionRequest.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.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) {
+ var error = $root.google.cloud.kms.v1.CryptoKeyVersion.verify(message.cryptoKeyVersion);
+ if (error)
+ return "cryptoKeyVersion." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CreateCryptoKeyVersionRequest} CreateCryptoKeyVersionRequest
+ */
+ CreateCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CreateCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CreateCryptoKeyVersionRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.cryptoKeyVersion != null) {
+ if (typeof object.cryptoKeyVersion !== "object")
+ throw TypeError(".google.cloud.kms.v1.CreateCryptoKeyVersionRequest.cryptoKeyVersion: object expected");
+ message.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.fromObject(object.cryptoKeyVersion);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.CreateCryptoKeyVersionRequest} message CreateCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateCryptoKeyVersionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.cryptoKeyVersion = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion"))
+ object.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.toObject(message.cryptoKeyVersion, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CreateCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CreateCryptoKeyVersionRequest";
+ };
+
+ return CreateCryptoKeyVersionRequest;
+ })();
+
+ v1.ImportCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of an ImportCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IImportCryptoKeyVersionRequest
+ * @property {string|null} [parent] ImportCryptoKeyVersionRequest parent
+ * @property {string|null} [cryptoKeyVersion] ImportCryptoKeyVersionRequest cryptoKeyVersion
+ * @property {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm|null} [algorithm] ImportCryptoKeyVersionRequest algorithm
+ * @property {string|null} [importJob] ImportCryptoKeyVersionRequest importJob
+ * @property {Uint8Array|null} [rsaAesWrappedKey] ImportCryptoKeyVersionRequest rsaAesWrappedKey
+ */
+
+ /**
+ * Constructs a new ImportCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an ImportCryptoKeyVersionRequest.
+ * @implements IImportCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function ImportCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ImportCryptoKeyVersionRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ ImportCryptoKeyVersionRequest.prototype.parent = "";
+
+ /**
+ * ImportCryptoKeyVersionRequest cryptoKeyVersion.
+ * @member {string} cryptoKeyVersion
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ ImportCryptoKeyVersionRequest.prototype.cryptoKeyVersion = "";
+
+ /**
+ * ImportCryptoKeyVersionRequest algorithm.
+ * @member {google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm} algorithm
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ ImportCryptoKeyVersionRequest.prototype.algorithm = 0;
+
+ /**
+ * ImportCryptoKeyVersionRequest importJob.
+ * @member {string} importJob
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ ImportCryptoKeyVersionRequest.prototype.importJob = "";
+
+ /**
+ * ImportCryptoKeyVersionRequest rsaAesWrappedKey.
+ * @member {Uint8Array|null|undefined} rsaAesWrappedKey
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ ImportCryptoKeyVersionRequest.prototype.rsaAesWrappedKey = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * ImportCryptoKeyVersionRequest wrappedKeyMaterial.
+ * @member {"rsaAesWrappedKey"|undefined} wrappedKeyMaterial
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ */
+ Object.defineProperty(ImportCryptoKeyVersionRequest.prototype, "wrappedKeyMaterial", {
+ get: $util.oneOfGetter($oneOfFields = ["rsaAesWrappedKey"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new ImportCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.ImportCryptoKeyVersionRequest} ImportCryptoKeyVersionRequest instance
+ */
+ ImportCryptoKeyVersionRequest.create = function create(properties) {
+ return new ImportCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ImportCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.ImportCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest} message ImportCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportCryptoKeyVersionRequest.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.algorithm != null && Object.hasOwnProperty.call(message, "algorithm"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm);
+ if (message.importJob != null && Object.hasOwnProperty.call(message, "importJob"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.importJob);
+ if (message.rsaAesWrappedKey != null && Object.hasOwnProperty.call(message, "rsaAesWrappedKey"))
+ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.rsaAesWrappedKey);
+ if (message.cryptoKeyVersion != null && Object.hasOwnProperty.call(message, "cryptoKeyVersion"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.cryptoKeyVersion);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.ImportCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IImportCryptoKeyVersionRequest} message ImportCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.ImportCryptoKeyVersionRequest} ImportCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.ImportCryptoKeyVersionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 6: {
+ message.cryptoKeyVersion = reader.string();
+ break;
+ }
+ case 2: {
+ message.algorithm = reader.int32();
+ break;
+ }
+ case 4: {
+ message.importJob = reader.string();
+ break;
+ }
+ case 5: {
+ message.rsaAesWrappedKey = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.ImportCryptoKeyVersionRequest} ImportCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportCryptoKeyVersionRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion"))
+ if (!$util.isString(message.cryptoKeyVersion))
+ return "cryptoKeyVersion: string expected";
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ switch (message.algorithm) {
+ default:
+ return "algorithm: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 15:
+ case 5:
+ case 6:
+ case 7:
+ case 16:
+ case 28:
+ case 29:
+ case 30:
+ case 8:
+ case 9:
+ case 10:
+ case 17:
+ case 37:
+ case 38:
+ case 39:
+ case 12:
+ case 13:
+ case 31:
+ case 32:
+ case 18:
+ break;
+ }
+ if (message.importJob != null && message.hasOwnProperty("importJob"))
+ if (!$util.isString(message.importJob))
+ return "importJob: string expected";
+ if (message.rsaAesWrappedKey != null && message.hasOwnProperty("rsaAesWrappedKey")) {
+ properties.wrappedKeyMaterial = 1;
+ if (!(message.rsaAesWrappedKey && typeof message.rsaAesWrappedKey.length === "number" || $util.isString(message.rsaAesWrappedKey)))
+ return "rsaAesWrappedKey: buffer expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.ImportCryptoKeyVersionRequest} ImportCryptoKeyVersionRequest
+ */
+ ImportCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.ImportCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.ImportCryptoKeyVersionRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.cryptoKeyVersion != null)
+ message.cryptoKeyVersion = String(object.cryptoKeyVersion);
+ switch (object.algorithm) {
+ default:
+ if (typeof object.algorithm === "number") {
+ message.algorithm = object.algorithm;
+ break;
+ }
+ break;
+ case "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED":
+ case 0:
+ message.algorithm = 0;
+ break;
+ case "GOOGLE_SYMMETRIC_ENCRYPTION":
+ case 1:
+ message.algorithm = 1;
+ break;
+ case "RSA_SIGN_PSS_2048_SHA256":
+ case 2:
+ message.algorithm = 2;
+ break;
+ case "RSA_SIGN_PSS_3072_SHA256":
+ case 3:
+ message.algorithm = 3;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA256":
+ case 4:
+ message.algorithm = 4;
+ break;
+ case "RSA_SIGN_PSS_4096_SHA512":
+ case 15:
+ message.algorithm = 15;
+ break;
+ case "RSA_SIGN_PKCS1_2048_SHA256":
+ case 5:
+ message.algorithm = 5;
+ break;
+ case "RSA_SIGN_PKCS1_3072_SHA256":
+ case 6:
+ message.algorithm = 6;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA256":
+ case 7:
+ message.algorithm = 7;
+ break;
+ case "RSA_SIGN_PKCS1_4096_SHA512":
+ case 16:
+ message.algorithm = 16;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_2048":
+ case 28:
+ message.algorithm = 28;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_3072":
+ case 29:
+ message.algorithm = 29;
+ break;
+ case "RSA_SIGN_RAW_PKCS1_4096":
+ case 30:
+ message.algorithm = 30;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA256":
+ case 8:
+ message.algorithm = 8;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA256":
+ case 9:
+ message.algorithm = 9;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA256":
+ case 10:
+ message.algorithm = 10;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA512":
+ case 17:
+ message.algorithm = 17;
+ break;
+ case "RSA_DECRYPT_OAEP_2048_SHA1":
+ case 37:
+ message.algorithm = 37;
+ break;
+ case "RSA_DECRYPT_OAEP_3072_SHA1":
+ case 38:
+ message.algorithm = 38;
+ break;
+ case "RSA_DECRYPT_OAEP_4096_SHA1":
+ case 39:
+ message.algorithm = 39;
+ break;
+ case "EC_SIGN_P256_SHA256":
+ case 12:
+ message.algorithm = 12;
+ break;
+ case "EC_SIGN_P384_SHA384":
+ case 13:
+ message.algorithm = 13;
+ break;
+ case "EC_SIGN_SECP256K1_SHA256":
+ case 31:
+ message.algorithm = 31;
+ break;
+ case "HMAC_SHA256":
+ case 32:
+ message.algorithm = 32;
+ break;
+ case "EXTERNAL_SYMMETRIC_ENCRYPTION":
+ case 18:
+ message.algorithm = 18;
+ break;
+ }
+ if (object.importJob != null)
+ message.importJob = String(object.importJob);
+ if (object.rsaAesWrappedKey != null)
+ if (typeof object.rsaAesWrappedKey === "string")
+ $util.base64.decode(object.rsaAesWrappedKey, message.rsaAesWrappedKey = $util.newBuffer($util.base64.length(object.rsaAesWrappedKey)), 0);
+ else if (object.rsaAesWrappedKey.length >= 0)
+ message.rsaAesWrappedKey = object.rsaAesWrappedKey;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.ImportCryptoKeyVersionRequest} message ImportCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportCryptoKeyVersionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.algorithm = options.enums === String ? "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" : 0;
+ object.importJob = "";
+ object.cryptoKeyVersion = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.algorithm != null && message.hasOwnProperty("algorithm"))
+ object.algorithm = options.enums === String ? $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm[message.algorithm] : message.algorithm;
+ if (message.importJob != null && message.hasOwnProperty("importJob"))
+ object.importJob = message.importJob;
+ if (message.rsaAesWrappedKey != null && message.hasOwnProperty("rsaAesWrappedKey")) {
+ object.rsaAesWrappedKey = options.bytes === String ? $util.base64.encode(message.rsaAesWrappedKey, 0, message.rsaAesWrappedKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rsaAesWrappedKey) : message.rsaAesWrappedKey;
+ if (options.oneofs)
+ object.wrappedKeyMaterial = "rsaAesWrappedKey";
+ }
+ if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion"))
+ object.cryptoKeyVersion = message.cryptoKeyVersion;
+ return object;
+ };
+
+ /**
+ * Converts this ImportCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.ImportCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.ImportCryptoKeyVersionRequest";
+ };
+
+ return ImportCryptoKeyVersionRequest;
+ })();
+
+ v1.CreateImportJobRequest = (function() {
+
+ /**
+ * Properties of a CreateImportJobRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface ICreateImportJobRequest
+ * @property {string|null} [parent] CreateImportJobRequest parent
+ * @property {string|null} [importJobId] CreateImportJobRequest importJobId
+ * @property {google.cloud.kms.v1.IImportJob|null} [importJob] CreateImportJobRequest importJob
+ */
+
+ /**
+ * Constructs a new CreateImportJobRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a CreateImportJobRequest.
+ * @implements ICreateImportJobRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest=} [properties] Properties to set
+ */
+ function CreateImportJobRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateImportJobRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @instance
+ */
+ CreateImportJobRequest.prototype.parent = "";
+
+ /**
+ * CreateImportJobRequest importJobId.
+ * @member {string} importJobId
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @instance
+ */
+ CreateImportJobRequest.prototype.importJobId = "";
+
+ /**
+ * CreateImportJobRequest importJob.
+ * @member {google.cloud.kms.v1.IImportJob|null|undefined} importJob
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @instance
+ */
+ CreateImportJobRequest.prototype.importJob = null;
+
+ /**
+ * Creates a new CreateImportJobRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.CreateImportJobRequest} CreateImportJobRequest instance
+ */
+ CreateImportJobRequest.create = function create(properties) {
+ return new CreateImportJobRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateImportJobRequest message. Does not implicitly {@link google.cloud.kms.v1.CreateImportJobRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest} message CreateImportJobRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateImportJobRequest.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.importJobId != null && Object.hasOwnProperty.call(message, "importJobId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.importJobId);
+ if (message.importJob != null && Object.hasOwnProperty.call(message, "importJob"))
+ $root.google.cloud.kms.v1.ImportJob.encode(message.importJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateImportJobRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.CreateImportJobRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.ICreateImportJobRequest} message CreateImportJobRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateImportJobRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateImportJobRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.CreateImportJobRequest} CreateImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateImportJobRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.CreateImportJobRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.importJobId = reader.string();
+ break;
+ }
+ case 3: {
+ message.importJob = $root.google.cloud.kms.v1.ImportJob.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateImportJobRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.CreateImportJobRequest} CreateImportJobRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateImportJobRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateImportJobRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateImportJobRequest.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.importJobId != null && message.hasOwnProperty("importJobId"))
+ if (!$util.isString(message.importJobId))
+ return "importJobId: string expected";
+ if (message.importJob != null && message.hasOwnProperty("importJob")) {
+ var error = $root.google.cloud.kms.v1.ImportJob.verify(message.importJob);
+ if (error)
+ return "importJob." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateImportJobRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.CreateImportJobRequest} CreateImportJobRequest
+ */
+ CreateImportJobRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.CreateImportJobRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.CreateImportJobRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.importJobId != null)
+ message.importJobId = String(object.importJobId);
+ if (object.importJob != null) {
+ if (typeof object.importJob !== "object")
+ throw TypeError(".google.cloud.kms.v1.CreateImportJobRequest.importJob: object expected");
+ message.importJob = $root.google.cloud.kms.v1.ImportJob.fromObject(object.importJob);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateImportJobRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {google.cloud.kms.v1.CreateImportJobRequest} message CreateImportJobRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateImportJobRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.importJobId = "";
+ object.importJob = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.importJobId != null && message.hasOwnProperty("importJobId"))
+ object.importJobId = message.importJobId;
+ if (message.importJob != null && message.hasOwnProperty("importJob"))
+ object.importJob = $root.google.cloud.kms.v1.ImportJob.toObject(message.importJob, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateImportJobRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateImportJobRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateImportJobRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.CreateImportJobRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateImportJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.CreateImportJobRequest";
+ };
+
+ return CreateImportJobRequest;
+ })();
+
+ v1.UpdateCryptoKeyRequest = (function() {
+
+ /**
+ * Properties of an UpdateCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IUpdateCryptoKeyRequest
+ * @property {google.cloud.kms.v1.ICryptoKey|null} [cryptoKey] UpdateCryptoKeyRequest cryptoKey
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCryptoKeyRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateCryptoKeyRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an UpdateCryptoKeyRequest.
+ * @implements IUpdateCryptoKeyRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest=} [properties] Properties to set
+ */
+ function UpdateCryptoKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateCryptoKeyRequest cryptoKey.
+ * @member {google.cloud.kms.v1.ICryptoKey|null|undefined} cryptoKey
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @instance
+ */
+ UpdateCryptoKeyRequest.prototype.cryptoKey = null;
+
+ /**
+ * UpdateCryptoKeyRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @instance
+ */
+ UpdateCryptoKeyRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateCryptoKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyRequest} UpdateCryptoKeyRequest instance
+ */
+ UpdateCryptoKeyRequest.create = function create(properties) {
+ return new UpdateCryptoKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateCryptoKeyRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest} message UpdateCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
+ $root.google.cloud.kms.v1.CryptoKey.encode(message.cryptoKey, 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 UpdateCryptoKeyRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyRequest} message UpdateCryptoKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyRequest} UpdateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.UpdateCryptoKeyRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyRequest} UpdateCryptoKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateCryptoKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateCryptoKeyRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
+ var error = $root.google.cloud.kms.v1.CryptoKey.verify(message.cryptoKey);
+ if (error)
+ return "cryptoKey." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateCryptoKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyRequest} UpdateCryptoKeyRequest
+ */
+ UpdateCryptoKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.UpdateCryptoKeyRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.UpdateCryptoKeyRequest();
+ if (object.cryptoKey != null) {
+ if (typeof object.cryptoKey !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateCryptoKeyRequest.cryptoKey: object expected");
+ message.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.fromObject(object.cryptoKey);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateCryptoKeyRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {google.cloud.kms.v1.UpdateCryptoKeyRequest} message UpdateCryptoKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateCryptoKeyRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.cryptoKey = null;
+ object.updateMask = null;
+ }
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
+ object.cryptoKey = $root.google.cloud.kms.v1.CryptoKey.toObject(message.cryptoKey, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateCryptoKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateCryptoKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateCryptoKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.UpdateCryptoKeyRequest";
+ };
+
+ return UpdateCryptoKeyRequest;
+ })();
+
+ v1.UpdateCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of an UpdateCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IUpdateCryptoKeyVersionRequest
+ * @property {google.cloud.kms.v1.ICryptoKeyVersion|null} [cryptoKeyVersion] UpdateCryptoKeyVersionRequest cryptoKeyVersion
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCryptoKeyVersionRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an UpdateCryptoKeyVersionRequest.
+ * @implements IUpdateCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function UpdateCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateCryptoKeyVersionRequest cryptoKeyVersion.
+ * @member {google.cloud.kms.v1.ICryptoKeyVersion|null|undefined} cryptoKeyVersion
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @instance
+ */
+ UpdateCryptoKeyVersionRequest.prototype.cryptoKeyVersion = null;
+
+ /**
+ * UpdateCryptoKeyVersionRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @instance
+ */
+ UpdateCryptoKeyVersionRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyVersionRequest} UpdateCryptoKeyVersionRequest instance
+ */
+ UpdateCryptoKeyVersionRequest.create = function create(properties) {
+ return new UpdateCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest} message UpdateCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyVersionRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cryptoKeyVersion != null && Object.hasOwnProperty.call(message, "cryptoKeyVersion"))
+ $root.google.cloud.kms.v1.CryptoKeyVersion.encode(message.cryptoKeyVersion, 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 UpdateCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest} message UpdateCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyVersionRequest} UpdateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyVersionRequest} UpdateCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateCryptoKeyVersionRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) {
+ var error = $root.google.cloud.kms.v1.CryptoKeyVersion.verify(message.cryptoKeyVersion);
+ if (error)
+ return "cryptoKeyVersion." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyVersionRequest} UpdateCryptoKeyVersionRequest
+ */
+ UpdateCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest();
+ if (object.cryptoKeyVersion != null) {
+ if (typeof object.cryptoKeyVersion !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.cryptoKeyVersion: object expected");
+ message.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.fromObject(object.cryptoKeyVersion);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.UpdateCryptoKeyVersionRequest} message UpdateCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateCryptoKeyVersionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.cryptoKeyVersion = null;
+ object.updateMask = null;
+ }
+ if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion"))
+ object.cryptoKeyVersion = $root.google.cloud.kms.v1.CryptoKeyVersion.toObject(message.cryptoKeyVersion, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.UpdateCryptoKeyVersionRequest";
+ };
+
+ return UpdateCryptoKeyVersionRequest;
+ })();
+
+ v1.UpdateCryptoKeyPrimaryVersionRequest = (function() {
+
+ /**
+ * Properties of an UpdateCryptoKeyPrimaryVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IUpdateCryptoKeyPrimaryVersionRequest
+ * @property {string|null} [name] UpdateCryptoKeyPrimaryVersionRequest name
+ * @property {string|null} [cryptoKeyVersionId] UpdateCryptoKeyPrimaryVersionRequest cryptoKeyVersionId
+ */
+
+ /**
+ * Constructs a new UpdateCryptoKeyPrimaryVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an UpdateCryptoKeyPrimaryVersionRequest.
+ * @implements IUpdateCryptoKeyPrimaryVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest=} [properties] Properties to set
+ */
+ function UpdateCryptoKeyPrimaryVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateCryptoKeyPrimaryVersionRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @instance
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.prototype.name = "";
+
+ /**
+ * UpdateCryptoKeyPrimaryVersionRequest cryptoKeyVersionId.
+ * @member {string} cryptoKeyVersionId
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @instance
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.prototype.cryptoKeyVersionId = "";
+
+ /**
+ * Creates a new UpdateCryptoKeyPrimaryVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest} UpdateCryptoKeyPrimaryVersionRequest instance
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.create = function create(properties) {
+ return new UpdateCryptoKeyPrimaryVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateCryptoKeyPrimaryVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest} message UpdateCryptoKeyPrimaryVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.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.cryptoKeyVersionId != null && Object.hasOwnProperty.call(message, "cryptoKeyVersionId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyVersionId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateCryptoKeyPrimaryVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest} message UpdateCryptoKeyPrimaryVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyPrimaryVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest} UpdateCryptoKeyPrimaryVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.cryptoKeyVersionId = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateCryptoKeyPrimaryVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest} UpdateCryptoKeyPrimaryVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateCryptoKeyPrimaryVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.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.cryptoKeyVersionId != null && message.hasOwnProperty("cryptoKeyVersionId"))
+ if (!$util.isString(message.cryptoKeyVersionId))
+ return "cryptoKeyVersionId: string expected";
+ return null;
+ };
+
+ /**
+ * Creates an UpdateCryptoKeyPrimaryVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest} UpdateCryptoKeyPrimaryVersionRequest
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.cryptoKeyVersionId != null)
+ message.cryptoKeyVersionId = String(object.cryptoKeyVersionId);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateCryptoKeyPrimaryVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest} message UpdateCryptoKeyPrimaryVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.cryptoKeyVersionId = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.cryptoKeyVersionId != null && message.hasOwnProperty("cryptoKeyVersionId"))
+ object.cryptoKeyVersionId = message.cryptoKeyVersionId;
+ return object;
+ };
+
+ /**
+ * Converts this UpdateCryptoKeyPrimaryVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateCryptoKeyPrimaryVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateCryptoKeyPrimaryVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest";
+ };
+
+ return UpdateCryptoKeyPrimaryVersionRequest;
+ })();
+
+ v1.DestroyCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of a DestroyCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IDestroyCryptoKeyVersionRequest
+ * @property {string|null} [name] DestroyCryptoKeyVersionRequest name
+ */
+
+ /**
+ * Constructs a new DestroyCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a DestroyCryptoKeyVersionRequest.
+ * @implements IDestroyCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function DestroyCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * DestroyCryptoKeyVersionRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @instance
+ */
+ DestroyCryptoKeyVersionRequest.prototype.name = "";
+
+ /**
+ * Creates a new DestroyCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.DestroyCryptoKeyVersionRequest} DestroyCryptoKeyVersionRequest instance
+ */
+ DestroyCryptoKeyVersionRequest.create = function create(properties) {
+ return new DestroyCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified DestroyCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.DestroyCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest} message DestroyCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DestroyCryptoKeyVersionRequest.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 DestroyCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.DestroyCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest} message DestroyCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DestroyCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DestroyCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.DestroyCryptoKeyVersionRequest} DestroyCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DestroyCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest();
+ 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 DestroyCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.DestroyCryptoKeyVersionRequest} DestroyCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DestroyCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DestroyCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DestroyCryptoKeyVersionRequest.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 DestroyCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.DestroyCryptoKeyVersionRequest} DestroyCryptoKeyVersionRequest
+ */
+ DestroyCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DestroyCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.DestroyCryptoKeyVersionRequest} message DestroyCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DestroyCryptoKeyVersionRequest.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 DestroyCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DestroyCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DestroyCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.DestroyCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DestroyCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.DestroyCryptoKeyVersionRequest";
+ };
+
+ return DestroyCryptoKeyVersionRequest;
+ })();
+
+ v1.RestoreCryptoKeyVersionRequest = (function() {
+
+ /**
+ * Properties of a RestoreCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IRestoreCryptoKeyVersionRequest
+ * @property {string|null} [name] RestoreCryptoKeyVersionRequest name
+ */
+
+ /**
+ * Constructs a new RestoreCryptoKeyVersionRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a RestoreCryptoKeyVersionRequest.
+ * @implements IRestoreCryptoKeyVersionRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest=} [properties] Properties to set
+ */
+ function RestoreCryptoKeyVersionRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RestoreCryptoKeyVersionRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @instance
+ */
+ RestoreCryptoKeyVersionRequest.prototype.name = "";
+
+ /**
+ * Creates a new RestoreCryptoKeyVersionRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.RestoreCryptoKeyVersionRequest} RestoreCryptoKeyVersionRequest instance
+ */
+ RestoreCryptoKeyVersionRequest.create = function create(properties) {
+ return new RestoreCryptoKeyVersionRequest(properties);
+ };
+
+ /**
+ * Encodes the specified RestoreCryptoKeyVersionRequest message. Does not implicitly {@link google.cloud.kms.v1.RestoreCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest} message RestoreCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RestoreCryptoKeyVersionRequest.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 RestoreCryptoKeyVersionRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.RestoreCryptoKeyVersionRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest} message RestoreCryptoKeyVersionRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RestoreCryptoKeyVersionRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RestoreCryptoKeyVersionRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.RestoreCryptoKeyVersionRequest} RestoreCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RestoreCryptoKeyVersionRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest();
+ 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 RestoreCryptoKeyVersionRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.RestoreCryptoKeyVersionRequest} RestoreCryptoKeyVersionRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RestoreCryptoKeyVersionRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RestoreCryptoKeyVersionRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RestoreCryptoKeyVersionRequest.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 RestoreCryptoKeyVersionRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.RestoreCryptoKeyVersionRequest} RestoreCryptoKeyVersionRequest
+ */
+ RestoreCryptoKeyVersionRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RestoreCryptoKeyVersionRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {google.cloud.kms.v1.RestoreCryptoKeyVersionRequest} message RestoreCryptoKeyVersionRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RestoreCryptoKeyVersionRequest.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 RestoreCryptoKeyVersionRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RestoreCryptoKeyVersionRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RestoreCryptoKeyVersionRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.RestoreCryptoKeyVersionRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RestoreCryptoKeyVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.RestoreCryptoKeyVersionRequest";
+ };
+
+ return RestoreCryptoKeyVersionRequest;
+ })();
+
+ v1.EncryptRequest = (function() {
+
+ /**
+ * Properties of an EncryptRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IEncryptRequest
+ * @property {string|null} [name] EncryptRequest name
+ * @property {Uint8Array|null} [plaintext] EncryptRequest plaintext
+ * @property {Uint8Array|null} [additionalAuthenticatedData] EncryptRequest additionalAuthenticatedData
+ * @property {google.protobuf.IInt64Value|null} [plaintextCrc32c] EncryptRequest plaintextCrc32c
+ * @property {google.protobuf.IInt64Value|null} [additionalAuthenticatedDataCrc32c] EncryptRequest additionalAuthenticatedDataCrc32c
+ */
+
+ /**
+ * Constructs a new EncryptRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents an EncryptRequest.
+ * @implements IEncryptRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IEncryptRequest=} [properties] Properties to set
+ */
+ function EncryptRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EncryptRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ */
+ EncryptRequest.prototype.name = "";
+
+ /**
+ * EncryptRequest plaintext.
+ * @member {Uint8Array} plaintext
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ */
+ EncryptRequest.prototype.plaintext = $util.newBuffer([]);
+
+ /**
+ * EncryptRequest additionalAuthenticatedData.
+ * @member {Uint8Array} additionalAuthenticatedData
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ */
+ EncryptRequest.prototype.additionalAuthenticatedData = $util.newBuffer([]);
+
+ /**
+ * EncryptRequest plaintextCrc32c.
+ * @member {google.protobuf.IInt64Value|null|undefined} plaintextCrc32c
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ */
+ EncryptRequest.prototype.plaintextCrc32c = null;
+
+ /**
+ * EncryptRequest additionalAuthenticatedDataCrc32c.
+ * @member {google.protobuf.IInt64Value|null|undefined} additionalAuthenticatedDataCrc32c
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ */
+ EncryptRequest.prototype.additionalAuthenticatedDataCrc32c = null;
+
+ /**
+ * Creates a new EncryptRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IEncryptRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.EncryptRequest} EncryptRequest instance
+ */
+ EncryptRequest.create = function create(properties) {
+ return new EncryptRequest(properties);
+ };
+
+ /**
+ * Encodes the specified EncryptRequest message. Does not implicitly {@link google.cloud.kms.v1.EncryptRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IEncryptRequest} message EncryptRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EncryptRequest.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.plaintext != null && Object.hasOwnProperty.call(message, "plaintext"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.plaintext);
+ if (message.additionalAuthenticatedData != null && Object.hasOwnProperty.call(message, "additionalAuthenticatedData"))
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.additionalAuthenticatedData);
+ if (message.plaintextCrc32c != null && Object.hasOwnProperty.call(message, "plaintextCrc32c"))
+ $root.google.protobuf.Int64Value.encode(message.plaintextCrc32c, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.additionalAuthenticatedDataCrc32c != null && Object.hasOwnProperty.call(message, "additionalAuthenticatedDataCrc32c"))
+ $root.google.protobuf.Int64Value.encode(message.additionalAuthenticatedDataCrc32c, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EncryptRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.EncryptRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IEncryptRequest} message EncryptRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EncryptRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EncryptRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.EncryptRequest} EncryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EncryptRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.EncryptRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.plaintext = reader.bytes();
+ break;
+ }
+ case 3: {
+ message.additionalAuthenticatedData = reader.bytes();
+ break;
+ }
+ case 7: {
+ message.plaintextCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.additionalAuthenticatedDataCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EncryptRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.EncryptRequest} EncryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EncryptRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EncryptRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EncryptRequest.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.plaintext != null && message.hasOwnProperty("plaintext"))
+ if (!(message.plaintext && typeof message.plaintext.length === "number" || $util.isString(message.plaintext)))
+ return "plaintext: buffer expected";
+ if (message.additionalAuthenticatedData != null && message.hasOwnProperty("additionalAuthenticatedData"))
+ if (!(message.additionalAuthenticatedData && typeof message.additionalAuthenticatedData.length === "number" || $util.isString(message.additionalAuthenticatedData)))
+ return "additionalAuthenticatedData: buffer expected";
+ if (message.plaintextCrc32c != null && message.hasOwnProperty("plaintextCrc32c")) {
+ var error = $root.google.protobuf.Int64Value.verify(message.plaintextCrc32c);
+ if (error)
+ return "plaintextCrc32c." + error;
+ }
+ if (message.additionalAuthenticatedDataCrc32c != null && message.hasOwnProperty("additionalAuthenticatedDataCrc32c")) {
+ var error = $root.google.protobuf.Int64Value.verify(message.additionalAuthenticatedDataCrc32c);
+ if (error)
+ return "additionalAuthenticatedDataCrc32c." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an EncryptRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.kms.v1.EncryptRequest} EncryptRequest
+ */
+ EncryptRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.kms.v1.EncryptRequest)
+ return object;
+ var message = new $root.google.cloud.kms.v1.EncryptRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.plaintext != null)
+ if (typeof object.plaintext === "string")
+ $util.base64.decode(object.plaintext, message.plaintext = $util.newBuffer($util.base64.length(object.plaintext)), 0);
+ else if (object.plaintext.length >= 0)
+ message.plaintext = object.plaintext;
+ if (object.additionalAuthenticatedData != null)
+ if (typeof object.additionalAuthenticatedData === "string")
+ $util.base64.decode(object.additionalAuthenticatedData, message.additionalAuthenticatedData = $util.newBuffer($util.base64.length(object.additionalAuthenticatedData)), 0);
+ else if (object.additionalAuthenticatedData.length >= 0)
+ message.additionalAuthenticatedData = object.additionalAuthenticatedData;
+ if (object.plaintextCrc32c != null) {
+ if (typeof object.plaintextCrc32c !== "object")
+ throw TypeError(".google.cloud.kms.v1.EncryptRequest.plaintextCrc32c: object expected");
+ message.plaintextCrc32c = $root.google.protobuf.Int64Value.fromObject(object.plaintextCrc32c);
+ }
+ if (object.additionalAuthenticatedDataCrc32c != null) {
+ if (typeof object.additionalAuthenticatedDataCrc32c !== "object")
+ throw TypeError(".google.cloud.kms.v1.EncryptRequest.additionalAuthenticatedDataCrc32c: object expected");
+ message.additionalAuthenticatedDataCrc32c = $root.google.protobuf.Int64Value.fromObject(object.additionalAuthenticatedDataCrc32c);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EncryptRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.EncryptRequest} message EncryptRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EncryptRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ if (options.bytes === String)
+ object.plaintext = "";
+ else {
+ object.plaintext = [];
+ if (options.bytes !== Array)
+ object.plaintext = $util.newBuffer(object.plaintext);
+ }
+ if (options.bytes === String)
+ object.additionalAuthenticatedData = "";
+ else {
+ object.additionalAuthenticatedData = [];
+ if (options.bytes !== Array)
+ object.additionalAuthenticatedData = $util.newBuffer(object.additionalAuthenticatedData);
+ }
+ object.plaintextCrc32c = null;
+ object.additionalAuthenticatedDataCrc32c = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.plaintext != null && message.hasOwnProperty("plaintext"))
+ object.plaintext = options.bytes === String ? $util.base64.encode(message.plaintext, 0, message.plaintext.length) : options.bytes === Array ? Array.prototype.slice.call(message.plaintext) : message.plaintext;
+ if (message.additionalAuthenticatedData != null && message.hasOwnProperty("additionalAuthenticatedData"))
+ object.additionalAuthenticatedData = options.bytes === String ? $util.base64.encode(message.additionalAuthenticatedData, 0, message.additionalAuthenticatedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.additionalAuthenticatedData) : message.additionalAuthenticatedData;
+ if (message.plaintextCrc32c != null && message.hasOwnProperty("plaintextCrc32c"))
+ object.plaintextCrc32c = $root.google.protobuf.Int64Value.toObject(message.plaintextCrc32c, options);
+ if (message.additionalAuthenticatedDataCrc32c != null && message.hasOwnProperty("additionalAuthenticatedDataCrc32c"))
+ object.additionalAuthenticatedDataCrc32c = $root.google.protobuf.Int64Value.toObject(message.additionalAuthenticatedDataCrc32c, options);
+ return object;
+ };
+
+ /**
+ * Converts this EncryptRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EncryptRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EncryptRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.kms.v1.EncryptRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EncryptRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.kms.v1.EncryptRequest";
+ };
+
+ return EncryptRequest;
+ })();
+
+ v1.DecryptRequest = (function() {
+
+ /**
+ * Properties of a DecryptRequest.
+ * @memberof google.cloud.kms.v1
+ * @interface IDecryptRequest
+ * @property {string|null} [name] DecryptRequest name
+ * @property {Uint8Array|null} [ciphertext] DecryptRequest ciphertext
+ * @property {Uint8Array|null} [additionalAuthenticatedData] DecryptRequest additionalAuthenticatedData
+ * @property {google.protobuf.IInt64Value|null} [ciphertextCrc32c] DecryptRequest ciphertextCrc32c
+ * @property {google.protobuf.IInt64Value|null} [additionalAuthenticatedDataCrc32c] DecryptRequest additionalAuthenticatedDataCrc32c
+ */
+
+ /**
+ * Constructs a new DecryptRequest.
+ * @memberof google.cloud.kms.v1
+ * @classdesc Represents a DecryptRequest.
+ * @implements IDecryptRequest
+ * @constructor
+ * @param {google.cloud.kms.v1.IDecryptRequest=} [properties] Properties to set
+ */
+ function DecryptRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * DecryptRequest name.
+ * @member {string} name
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @instance
+ */
+ DecryptRequest.prototype.name = "";
+
+ /**
+ * DecryptRequest ciphertext.
+ * @member {Uint8Array} ciphertext
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @instance
+ */
+ DecryptRequest.prototype.ciphertext = $util.newBuffer([]);
+
+ /**
+ * DecryptRequest additionalAuthenticatedData.
+ * @member {Uint8Array} additionalAuthenticatedData
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @instance
+ */
+ DecryptRequest.prototype.additionalAuthenticatedData = $util.newBuffer([]);
+
+ /**
+ * DecryptRequest ciphertextCrc32c.
+ * @member {google.protobuf.IInt64Value|null|undefined} ciphertextCrc32c
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @instance
+ */
+ DecryptRequest.prototype.ciphertextCrc32c = null;
+
+ /**
+ * DecryptRequest additionalAuthenticatedDataCrc32c.
+ * @member {google.protobuf.IInt64Value|null|undefined} additionalAuthenticatedDataCrc32c
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @instance
+ */
+ DecryptRequest.prototype.additionalAuthenticatedDataCrc32c = null;
+
+ /**
+ * Creates a new DecryptRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDecryptRequest=} [properties] Properties to set
+ * @returns {google.cloud.kms.v1.DecryptRequest} DecryptRequest instance
+ */
+ DecryptRequest.create = function create(properties) {
+ return new DecryptRequest(properties);
+ };
+
+ /**
+ * Encodes the specified DecryptRequest message. Does not implicitly {@link google.cloud.kms.v1.DecryptRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDecryptRequest} message DecryptRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DecryptRequest.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.ciphertext != null && Object.hasOwnProperty.call(message, "ciphertext"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.ciphertext);
+ if (message.additionalAuthenticatedData != null && Object.hasOwnProperty.call(message, "additionalAuthenticatedData"))
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.additionalAuthenticatedData);
+ if (message.ciphertextCrc32c != null && Object.hasOwnProperty.call(message, "ciphertextCrc32c"))
+ $root.google.protobuf.Int64Value.encode(message.ciphertextCrc32c, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.additionalAuthenticatedDataCrc32c != null && Object.hasOwnProperty.call(message, "additionalAuthenticatedDataCrc32c"))
+ $root.google.protobuf.Int64Value.encode(message.additionalAuthenticatedDataCrc32c, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified DecryptRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.DecryptRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {google.cloud.kms.v1.IDecryptRequest} message DecryptRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DecryptRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DecryptRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.kms.v1.DecryptRequest} DecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DecryptRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.DecryptRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.ciphertext = reader.bytes();
+ break;
+ }
+ case 3: {
+ message.additionalAuthenticatedData = reader.bytes();
+ break;
+ }
+ case 5: {
+ message.ciphertextCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.additionalAuthenticatedDataCrc32c = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a DecryptRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.kms.v1.DecryptRequest} DecryptRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DecryptRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DecryptRequest message.
+ * @function verify
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DecryptRequest.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.ciphertext != null && message.hasOwnProperty("ciphertext"))
+ if (!(message.ciphertext && typeof message.ciphertext.length === "number" || $util.isString(message.ciphertext)))
+ return "ciphertext: buffer expected";
+ if (message.additionalAuthenticatedData != null && message.hasOwnProperty("additionalAuthenticatedData"))
+ if (!(message.additionalAuthenticatedData && typeof message.additionalAuthenticatedData.length === "number" || $util.isString(message.additionalAuthenticatedData)))
+ return "additionalAuthenticatedData: buffer expected";
+ if (message.ciphertextCrc32c != null && message.hasOwnProperty("ciphertextCrc32c")) {
+ var error = $root.google.protobuf.Int64Value.verify(message.ciphertextCrc32c);
+ if (error)
+ return "ciphertextCrc32c." + error;
+ }
+ if (message.additionalAuthenticatedDataCrc32c != null && message.hasOwnProperty("additionalAuthenticatedDataCrc32c")) {
+ var error = $root.google.protobuf.Int64Value.verify(message.additionalAuthenticatedDataCrc32c);
+ if (error)
+ return "additionalAuthenticatedDataCrc32c." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a DecryptRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.kms.v1.DecryptRequest
+ * @static
+ * @param {Object.