diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 21ad18bd7..d9b4b9749 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 -# created: 2023-05-24T20:32:43.844586914Z + digest: sha256:606f3d9d99a1c7cdfa7158cbb1a75bfeef490655e246a2052f9ee741740d736c +# created: 2023-08-17T19:15:55.176034173Z diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4a30a08e5..1350faeff 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -9,9 +9,9 @@ branchProtectionRules: - "ci/kokoro: System test" - docs - lint - - test (12) - test (14) - test (16) + - test (18) - cla/google - windows - OwlBot Post Processor diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f447b84ab..711957bad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [12, 14, 16] + node: [14, 16, 18, 20] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index bf173d26c..50452049e 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-bigtable/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node12/common.cfg b/.kokoro/continuous/node14/common.cfg similarity index 89% rename from .kokoro/continuous/node12/common.cfg rename to .kokoro/continuous/node14/common.cfg index bf173d26c..50452049e 100644 --- a/.kokoro/continuous/node12/common.cfg +++ b/.kokoro/continuous/node14/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-bigtable/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node12/lint.cfg b/.kokoro/continuous/node14/lint.cfg similarity index 100% rename from .kokoro/continuous/node12/lint.cfg rename to .kokoro/continuous/node14/lint.cfg diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node14/samples-test.cfg similarity index 100% rename from .kokoro/continuous/node12/samples-test.cfg rename to .kokoro/continuous/node14/samples-test.cfg diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node14/system-test.cfg similarity index 100% rename from .kokoro/continuous/node12/system-test.cfg rename to .kokoro/continuous/node14/system-test.cfg diff --git a/.kokoro/continuous/node12/test.cfg b/.kokoro/continuous/node14/test.cfg similarity index 100% rename from .kokoro/continuous/node12/test.cfg rename to .kokoro/continuous/node14/test.cfg diff --git a/.kokoro/presubmit/node12/common.cfg b/.kokoro/presubmit/node14/common.cfg similarity index 89% rename from .kokoro/presubmit/node12/common.cfg rename to .kokoro/presubmit/node14/common.cfg index bf173d26c..50452049e 100644 --- a/.kokoro/presubmit/node12/common.cfg +++ b/.kokoro/presubmit/node14/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-bigtable/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node14/samples-test.cfg similarity index 100% rename from .kokoro/presubmit/node12/samples-test.cfg rename to .kokoro/presubmit/node14/samples-test.cfg diff --git a/.kokoro/presubmit/node12/system-test.cfg b/.kokoro/presubmit/node14/system-test.cfg similarity index 100% rename from .kokoro/presubmit/node12/system-test.cfg rename to .kokoro/presubmit/node14/system-test.cfg diff --git a/.kokoro/presubmit/node12/test.cfg b/.kokoro/presubmit/node14/test.cfg similarity index 100% rename from .kokoro/presubmit/node12/test.cfg rename to .kokoro/presubmit/node14/test.cfg diff --git a/.kokoro/release/docs.cfg b/.kokoro/release/docs.cfg index 1e7e894dc..e7b242ca4 100644 --- a/.kokoro/release/docs.cfg +++ b/.kokoro/release/docs.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } # Download trampoline resources. diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index ac47cab6a..38427397c 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -30,7 +30,7 @@ build_file: "nodejs-bigtable/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 806c00822..8c5d108cb 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -56,7 +56,7 @@ fi # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index 0201e9dfd..0b3043d26 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -49,7 +49,7 @@ npm run system-test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/test.bat b/.kokoro/test.bat index ae59e59be..0bb124052 100644 --- a/.kokoro/test.bat +++ b/.kokoro/test.bat @@ -21,7 +21,7 @@ cd .. @rem we upgrade Node.js in the image: SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm -call nvm use v12.14.1 +call nvm use v14.17.3 call which node call npm install || goto :error diff --git a/.kokoro/test.sh b/.kokoro/test.sh index a5c7ac04c..862d478d3 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -39,7 +39,7 @@ npm test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/CHANGELOG.md b/CHANGELOG.md index 66bd6b4c0..b033712b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,32 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigtable?activeTab=versions +## [5.0.0](https://github.com/googleapis/nodejs-bigtable/compare/v4.6.1...v5.0.0) (2023-08-10) + + +### ⚠ BREAKING CHANGES + +* upgrade to Node 14 ([#1311](https://github.com/googleapis/nodejs-bigtable/issues/1311)) + +### Miscellaneous Chores + +* Upgrade to Node 14 ([#1311](https://github.com/googleapis/nodejs-bigtable/issues/1311)) ([4330cb2](https://github.com/googleapis/nodejs-bigtable/commit/4330cb238ec887e85456cde0f18f3881caca5e14)) + +## [4.6.1](https://github.com/googleapis/nodejs-bigtable/compare/v4.6.0...v4.6.1) (2023-05-30) + + +### Bug Fixes + +* Properly handle asynchronous read from stream ([#1284](https://github.com/googleapis/nodejs-bigtable/issues/1284)) ([55d86ba](https://github.com/googleapis/nodejs-bigtable/commit/55d86baaf554247c0c3d063fc790a37569f3e77b)). This could result in silently dropped rows in a `createReadStream`. The bug is active when the `ReadRows` stream would be piped into a consumer that would defer the processing of the rows until the next event loop run (i.e. use a `Transform` that would defer the callback invocation via `setTimeout()`). + + +## [4.6.0](https://github.com/googleapis/nodejs-bigtable/compare/v4.5.2...v4.6.0) (2023-05-26) + + +### Features + +* Add ChangeStreamConfig to CreateTable and UpdateTable ([#1269](https://github.com/googleapis/nodejs-bigtable/issues/1269)) ([2b05fa4](https://github.com/googleapis/nodejs-bigtable/commit/2b05fa4c7ad37fa4478f5de3cf5645b44b34ecfc)) + ## [4.5.2](https://github.com/googleapis/nodejs-bigtable/compare/v4.5.1...v4.5.2) (2023-05-24) diff --git a/README.md b/README.md index 90dbfbfb9..896aa0044 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ also contains samples. ## Supported Node.js Versions -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). 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 diff --git a/package.json b/package.json index 01e8d54bc..291f6f7c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigtable", - "version": "4.5.2", + "version": "5.0.0", "description": "Cloud Bigtable Client Library for Node.js", "keywords": [ "bigtable", @@ -47,16 +47,16 @@ "precompile": "gts clean" }, "dependencies": { - "@google-cloud/precise-date": "^3.0.0", - "@google-cloud/projectify": "^3.0.0", - "@google-cloud/promisify": "^3.0.0", + "@google-cloud/precise-date": "^4.0.0", + "@google-cloud/projectify": "^4.0.0", + "@google-cloud/promisify": "^4.0.0", "arrify": "^2.0.0", "concat-stream": "^2.0.0", "dot-prop": "^6.0.0", "escape-string-regexp": "^4.0.0", "extend": "^3.0.2", - "google-gax": "^3.5.2", - "grpc-gcp": "^1.0.0", + "google-gax": "^4.0.3", + "grpc-gcp": "^1.0.1", "is": "^3.0.1", "is-utf8": "^0.2.1", "lodash.snakecase": "^4.1.1", @@ -65,25 +65,26 @@ "stream-events": "^1.0.2" }, "devDependencies": { - "@grpc/grpc-js": "^1.7.1", + "@grpc/grpc-js": "^1.9.0", "@grpc/proto-loader": "^0.7.3", "@types/escape-string-regexp": "^1.0.0", "@types/extend": "^3.0.1", "@types/is": "0.0.22", "@types/lodash.snakecase": "^4.1.5", "@types/mocha": "^9.0.0", - "@types/node": "^18.0.0", + "@types/node": "^20.4.9", "@types/proxyquire": "^1.3.28", "@types/pumpify": "^1.4.1", "@types/sinon": "^10.0.0", "@types/uuid": "^9.0.0", - "c8": "^7.1.0", + "c8": "^8.0.1", "codecov": "^3.6.5", - "gts": "^3.1.0", - "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", + "gapic-tools": "^0.1.8", + "gts": "^5.0.0", + "jsdoc": "^4.0.2", + "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^4.0.0", + "linkinator": "^5.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "p-queue": "^6.0.2", @@ -93,12 +94,12 @@ "snap-shot-it": "^7.9.1", "tcp-port-used": "^1.0.2", "ts-loader": "^9.0.0", - "typescript": "^4.6.4", + "typescript": "^5.1.6", "uuid": "^9.0.0", "webpack": "^5.0.0", "webpack-cli": "^5.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } } diff --git a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto index 6a2d9eac9..203bb52d4 100644 --- a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -600,11 +600,15 @@ message UpdateTableRequest { Table table = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The list of fields to update. - // A mask specifying which fields (e.g. `deletion_protection`) in the `table` + // A mask specifying which fields (e.g. `change_stream_config`) in the `table` // field should be updated. This mask is relative to the `table` field, not to // the request message. The wildcard (*) path is currently not supported. - // Currently UpdateTable is only supported for the following field: - // * `deletion_protection` + // Currently UpdateTable is only supported for the following fields: + // + // * `change_stream_config` + // * `change_stream_config.retention_period` + // * `deletion_protection` + // // If `column_families` is set in `update_mask`, it will return an // UNIMPLEMENTED error. google.protobuf.FieldMask update_mask = 2 diff --git a/protos/google/bigtable/admin/v2/table.proto b/protos/google/bigtable/admin/v2/table.proto index 5a59fd203..1e6e0e383 100644 --- a/protos/google/bigtable/admin/v2/table.proto +++ b/protos/google/bigtable/admin/v2/table.proto @@ -48,6 +48,16 @@ message RestoreInfo { } } +// Change stream configuration. +message ChangeStreamConfig { + // How long the change stream should be retained. Change stream data older + // than the retention period will not be returned when reading the change + // stream from the table. + // Values must be at least 1 day and at most 7 days, and will be truncated to + // microsecond granularity. + google.protobuf.Duration retention_period = 1; +} + // A collection of user data indexed by row, column, and timestamp. // Each table is served using the resources of its parent cluster. message Table { @@ -157,6 +167,11 @@ message Table { // field will be populated with information about the restore. RestoreInfo restore_info = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // If specified, enable the change stream on this table. + // Otherwise, the change stream is disabled and the change stream is not + // retained. + ChangeStreamConfig change_stream_config = 8; + // Set to true to make the table protected against data loss. i.e. deleting // the following resources through Admin APIs are prohibited: // - The table. diff --git a/protos/google/bigtable/v2/bigtable.proto b/protos/google/bigtable/v2/bigtable.proto index 098d17e3e..8624833ad 100644 --- a/protos/google/bigtable/v2/bigtable.proto +++ b/protos/google/bigtable/v2/bigtable.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -227,7 +227,6 @@ service Bigtable { // Request message for Bigtable.ReadRows. message ReadRowsRequest { - // // The desired view into RequestStats that should be returned in the response. // // See also: RequestStats message. @@ -254,8 +253,8 @@ message ReadRowsRequest { } ]; - // This value specifies routing for replication. This API only accepts the - // empty value of app_profile_id. + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. string app_profile_id = 5; // The row keys and/or ranges to read sequentially. If not specified, reads @@ -489,6 +488,33 @@ message MutateRowsResponse { // One or more results for Entries from the batch request. repeated Entry entries = 1; + + // Information about how client should limit the rate (QPS). Primirily used by + // supported official Cloud Bigtable clients. If unset, the rate limit info is + // not provided by the server. + optional RateLimitInfo rate_limit_info = 3; +} + +// Information about how client should adjust the load to Bigtable. +message RateLimitInfo { + // Time that clients should wait before adjusting the target rate again. + // If clients adjust rate too frequently, the impact of the previous + // adjustment may not have been taken into account and may + // over-throttle or under-throttle. If clients adjust rate too slowly, they + // will not be responsive to load changes on server side, and may + // over-throttle or under-throttle. + google.protobuf.Duration period = 1; + + // If it has been at least one `period` since the last load adjustment, the + // client should multiply the current load by this value to get the new target + // load. For example, if the current load is 100 and `factor` is 0.8, the new + // target load should be 80. After adjusting, the client should ignore + // `factor` until another `period` has passed. + // + // The client can measure its load using any unit that's comparable over time + // For example, QPS can be used as long as each request involves a similar + // amount of work. + double factor = 2; } // Request message for Bigtable.CheckAndMutateRow. diff --git a/protos/google/bigtable/v2/feature_flags.proto b/protos/google/bigtable/v2/feature_flags.proto new file mode 100644 index 000000000..ba10707a3 --- /dev/null +++ b/protos/google/bigtable/v2/feature_flags.proto @@ -0,0 +1,39 @@ +// Copyright 2023 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.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option java_multiple_files = true; +option java_outer_classname = "FeatureFlagsProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// Feature flags supported by a client. +// This is intended to be sent as part of request metadata to assure the server +// that certain behaviors are safe to enable. This proto is meant to be +// serialized and websafe-base64 encoded under the `bigtable-features` metadata +// key. The value will remain constant for the lifetime of a client and due to +// HTTP2's HPACK compression, the request overhead will be tiny. +// This is an internal implementation detail and should not be used by endusers +// directly. +message FeatureFlags { + // Notify the server that the client enables batch write flow control by + // requesting RateLimitInfo from MutateRowsResponse. + bool mutate_rows_rate_limit = 3; +} diff --git a/protos/protos.d.ts b/protos/protos.d.ts index adce7f9af..719290484 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -9098,6 +9098,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ChangeStreamConfig. */ + interface IChangeStreamConfig { + + /** ChangeStreamConfig retentionPeriod */ + retentionPeriod?: (google.protobuf.IDuration|null); + } + + /** Represents a ChangeStreamConfig. */ + class ChangeStreamConfig implements IChangeStreamConfig { + + /** + * Constructs a new ChangeStreamConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IChangeStreamConfig); + + /** ChangeStreamConfig retentionPeriod. */ + public retentionPeriod?: (google.protobuf.IDuration|null); + + /** + * Creates a new ChangeStreamConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeStreamConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.IChangeStreamConfig): google.bigtable.admin.v2.ChangeStreamConfig; + + /** + * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @param message ChangeStreamConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @param message ChangeStreamConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.ChangeStreamConfig; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.ChangeStreamConfig; + + /** + * Verifies a ChangeStreamConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeStreamConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ChangeStreamConfig; + + /** + * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * @param message ChangeStreamConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ChangeStreamConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeStreamConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeStreamConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Table. */ interface ITable { @@ -9116,6 +9213,9 @@ export namespace google { /** Table restoreInfo */ restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + /** Table changeStreamConfig */ + changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + /** Table deletionProtection */ deletionProtection?: (boolean|null); } @@ -9144,6 +9244,9 @@ export namespace google { /** Table restoreInfo. */ public restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + /** Table changeStreamConfig. */ + public changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + /** Table deletionProtection. */ public deletionProtection: boolean; @@ -11551,6 +11654,9 @@ export namespace google { /** MutateRowsResponse entries */ entries?: (google.bigtable.v2.MutateRowsResponse.IEntry[]|null); + + /** MutateRowsResponse rateLimitInfo */ + rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); } /** Represents a MutateRowsResponse. */ @@ -11565,6 +11671,12 @@ export namespace google { /** MutateRowsResponse entries. */ public entries: google.bigtable.v2.MutateRowsResponse.IEntry[]; + /** MutateRowsResponse rateLimitInfo. */ + public rateLimitInfo?: (google.bigtable.v2.IRateLimitInfo|null); + + /** MutateRowsResponse _rateLimitInfo. */ + public _rateLimitInfo?: "rateLimitInfo"; + /** * Creates a new MutateRowsResponse instance using the specified properties. * @param [properties] Properties to set @@ -11749,6 +11861,109 @@ export namespace google { } } + /** Properties of a RateLimitInfo. */ + interface IRateLimitInfo { + + /** RateLimitInfo period */ + period?: (google.protobuf.IDuration|null); + + /** RateLimitInfo factor */ + factor?: (number|null); + } + + /** Represents a RateLimitInfo. */ + class RateLimitInfo implements IRateLimitInfo { + + /** + * Constructs a new RateLimitInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IRateLimitInfo); + + /** RateLimitInfo period. */ + public period?: (google.protobuf.IDuration|null); + + /** RateLimitInfo factor. */ + public factor: number; + + /** + * Creates a new RateLimitInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RateLimitInfo instance + */ + public static create(properties?: google.bigtable.v2.IRateLimitInfo): google.bigtable.v2.RateLimitInfo; + + /** + * Encodes the specified RateLimitInfo message. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. + * @param message RateLimitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IRateLimitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. + * @param message RateLimitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IRateLimitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.RateLimitInfo; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.RateLimitInfo; + + /** + * Verifies a RateLimitInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RateLimitInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.RateLimitInfo; + + /** + * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. + * @param message RateLimitInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.RateLimitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RateLimitInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RateLimitInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CheckAndMutateRowRequest. */ interface ICheckAndMutateRowRequest { @@ -16283,6 +16498,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FeatureFlags. */ + interface IFeatureFlags { + + /** FeatureFlags mutateRowsRateLimit */ + mutateRowsRateLimit?: (boolean|null); + } + + /** Represents a FeatureFlags. */ + class FeatureFlags implements IFeatureFlags { + + /** + * Constructs a new FeatureFlags. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IFeatureFlags); + + /** FeatureFlags mutateRowsRateLimit. */ + public mutateRowsRateLimit: boolean; + + /** + * Creates a new FeatureFlags instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureFlags instance + */ + public static create(properties?: google.bigtable.v2.IFeatureFlags): google.bigtable.v2.FeatureFlags; + + /** + * Encodes the specified FeatureFlags message. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @param message FeatureFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @param message FeatureFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IFeatureFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.v2.FeatureFlags; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.v2.FeatureFlags; + + /** + * Verifies a FeatureFlags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureFlags + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.FeatureFlags; + + /** + * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. + * @param message FeatureFlags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.FeatureFlags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureFlags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureFlags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ResponseParams. */ interface IResponseParams { @@ -16757,82 +17069,1524 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a 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); + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { - /** ResourceDescriptor singular */ - singular?: (string|null); + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { /** - * Constructs a new ResourceDescriptor. + * Constructs a new CommonLanguageSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; + constructor(properties?: google.api.ICommonLanguageSettings); - /** ResourceDescriptor singular. */ - public singular: string; + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns CommonLanguageSettings instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not 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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload 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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not 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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload 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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not 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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload 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.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not 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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload 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.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not 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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload 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.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not 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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload 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.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not 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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload 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.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not 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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload 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.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not 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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload 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.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not 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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload 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.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not 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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload 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.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not 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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload 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.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not 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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload 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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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 @@ -19063,6 +20817,9 @@ export namespace google { /** MessageOptions mapEntry */ mapEntry?: (boolean|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -19091,6 +20848,9 @@ export namespace google { /** MessageOptions mapEntry. */ public mapEntry: boolean; + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -19196,6 +20956,15 @@ export namespace google { /** FieldOptions weak */ weak?: (boolean|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions target */ + target?: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -19236,6 +21005,15 @@ export namespace google { /** FieldOptions weak. */ public weak: boolean; + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions target. */ + public target: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -19332,6 +21110,27 @@ export namespace google { JS_STRING = 1, JS_NUMBER = 2 } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } } /** Properties of an OneofOptions. */ @@ -19440,6 +21239,9 @@ export namespace google { /** EnumOptions deprecated */ deprecated?: (boolean|null); + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** EnumOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -19459,6 +21261,9 @@ export namespace google { /** EnumOptions deprecated. */ public deprecated: boolean; + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + /** EnumOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -20574,6 +22379,109 @@ export namespace google { } } + /** 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 Timestamp. */ interface ITimestamp { @@ -20877,109 +22785,6 @@ export namespace google { 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 an Empty. */ interface IEmpty { } diff --git a/protos/protos.js b/protos/protos.js index e3ea4ff84..114e9b130 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -20915,6 +20915,214 @@ return RestoreInfo; })(); + v2.ChangeStreamConfig = (function() { + + /** + * Properties of a ChangeStreamConfig. + * @memberof google.bigtable.admin.v2 + * @interface IChangeStreamConfig + * @property {google.protobuf.IDuration|null} [retentionPeriod] ChangeStreamConfig retentionPeriod + */ + + /** + * Constructs a new ChangeStreamConfig. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ChangeStreamConfig. + * @implements IChangeStreamConfig + * @constructor + * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + */ + function ChangeStreamConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeStreamConfig retentionPeriod. + * @member {google.protobuf.IDuration|null|undefined} retentionPeriod + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + */ + ChangeStreamConfig.prototype.retentionPeriod = null; + + /** + * Creates a new ChangeStreamConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig instance + */ + ChangeStreamConfig.create = function create(properties) { + return new ChangeStreamConfig(properties); + }; + + /** + * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeStreamConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeStreamConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (error) + return "retentionPeriod." + error; + } + return null; + }; + + /** + * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + */ + ChangeStreamConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) + return object; + var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + if (object.retentionPeriod != null) { + if (typeof object.retentionPeriod !== "object") + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + } + return message; + }; + + /** + * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.ChangeStreamConfig} message ChangeStreamConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeStreamConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.retentionPeriod = null; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + return object; + }; + + /** + * Converts this ChangeStreamConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + * @returns {Object.} JSON object + */ + ChangeStreamConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeStreamConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeStreamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ChangeStreamConfig"; + }; + + return ChangeStreamConfig; + })(); + v2.Table = (function() { /** @@ -20926,6 +21134,7 @@ * @property {Object.|null} [columnFamilies] Table columnFamilies * @property {google.bigtable.admin.v2.Table.TimestampGranularity|null} [granularity] Table granularity * @property {google.bigtable.admin.v2.IRestoreInfo|null} [restoreInfo] Table restoreInfo + * @property {google.bigtable.admin.v2.IChangeStreamConfig|null} [changeStreamConfig] Table changeStreamConfig * @property {boolean|null} [deletionProtection] Table deletionProtection */ @@ -20986,6 +21195,14 @@ */ Table.prototype.restoreInfo = null; + /** + * Table changeStreamConfig. + * @member {google.bigtable.admin.v2.IChangeStreamConfig|null|undefined} changeStreamConfig + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.changeStreamConfig = null; + /** * Table deletionProtection. * @member {boolean} deletionProtection @@ -21034,6 +21251,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.granularity); if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) $root.google.bigtable.admin.v2.RestoreInfo.encode(message.restoreInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) + $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); return writer; @@ -21128,6 +21347,10 @@ message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.decode(reader, reader.uint32()); break; } + case 8: { + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32()); + break; + } case 9: { message.deletionProtection = reader.bool(); break; @@ -21203,6 +21426,11 @@ if (error) return "restoreInfo." + error; } + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { + var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig); + if (error) + return "changeStreamConfig." + error; + } if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) if (typeof message.deletionProtection !== "boolean") return "deletionProtection: boolean expected"; @@ -21264,6 +21492,11 @@ throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo); } + if (object.changeStreamConfig != null) { + if (typeof object.changeStreamConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig); + } if (object.deletionProtection != null) message.deletionProtection = Boolean(object.deletionProtection); return message; @@ -21290,6 +21523,7 @@ object.name = ""; object.granularity = options.enums === String ? "TIMESTAMP_GRANULARITY_UNSPECIFIED" : 0; object.restoreInfo = null; + object.changeStreamConfig = null; object.deletionProtection = false; } if (message.name != null && message.hasOwnProperty("name")) @@ -21309,6 +21543,8 @@ object.granularity = options.enums === String ? $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] === undefined ? message.granularity : $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] : message.granularity; if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) + object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) object.deletionProtection = message.deletionProtection; return object; @@ -27092,6 +27328,7 @@ * @memberof google.bigtable.v2 * @interface IMutateRowsResponse * @property {Array.|null} [entries] MutateRowsResponse entries + * @property {google.bigtable.v2.IRateLimitInfo|null} [rateLimitInfo] MutateRowsResponse rateLimitInfo */ /** @@ -27118,6 +27355,28 @@ */ MutateRowsResponse.prototype.entries = $util.emptyArray; + /** + * MutateRowsResponse rateLimitInfo. + * @member {google.bigtable.v2.IRateLimitInfo|null|undefined} rateLimitInfo + * @memberof google.bigtable.v2.MutateRowsResponse + * @instance + */ + MutateRowsResponse.prototype.rateLimitInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MutateRowsResponse _rateLimitInfo. + * @member {"rateLimitInfo"|undefined} _rateLimitInfo + * @memberof google.bigtable.v2.MutateRowsResponse + * @instance + */ + Object.defineProperty(MutateRowsResponse.prototype, "_rateLimitInfo", { + get: $util.oneOfGetter($oneOfFields = ["rateLimitInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new MutateRowsResponse instance using the specified properties. * @function create @@ -27145,6 +27404,8 @@ if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) $root.google.bigtable.v2.MutateRowsResponse.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rateLimitInfo != null && Object.hasOwnProperty.call(message, "rateLimitInfo")) + $root.google.bigtable.v2.RateLimitInfo.encode(message.rateLimitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -27185,6 +27446,10 @@ message.entries.push($root.google.bigtable.v2.MutateRowsResponse.Entry.decode(reader, reader.uint32())); break; } + case 3: { + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27220,6 +27485,7 @@ MutateRowsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.entries != null && message.hasOwnProperty("entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; @@ -27229,6 +27495,14 @@ return "entries." + error; } } + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + properties._rateLimitInfo = 1; + { + var error = $root.google.bigtable.v2.RateLimitInfo.verify(message.rateLimitInfo); + if (error) + return "rateLimitInfo." + error; + } + } return null; }; @@ -27254,6 +27528,11 @@ message.entries[i] = $root.google.bigtable.v2.MutateRowsResponse.Entry.fromObject(object.entries[i]); } } + if (object.rateLimitInfo != null) { + if (typeof object.rateLimitInfo !== "object") + throw TypeError(".google.bigtable.v2.MutateRowsResponse.rateLimitInfo: object expected"); + message.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.fromObject(object.rateLimitInfo); + } return message; }; @@ -27277,6 +27556,11 @@ for (var j = 0; j < message.entries.length; ++j) object.entries[j] = $root.google.bigtable.v2.MutateRowsResponse.Entry.toObject(message.entries[j], options); } + if (message.rateLimitInfo != null && message.hasOwnProperty("rateLimitInfo")) { + object.rateLimitInfo = $root.google.bigtable.v2.RateLimitInfo.toObject(message.rateLimitInfo, options); + if (options.oneofs) + object._rateLimitInfo = "rateLimitInfo"; + } return object; }; @@ -27555,31 +27839,25 @@ return MutateRowsResponse; })(); - v2.CheckAndMutateRowRequest = (function() { + v2.RateLimitInfo = (function() { /** - * Properties of a CheckAndMutateRowRequest. + * Properties of a RateLimitInfo. * @memberof google.bigtable.v2 - * @interface ICheckAndMutateRowRequest - * @property {string|null} [tableName] CheckAndMutateRowRequest tableName - * @property {string|null} [appProfileId] CheckAndMutateRowRequest appProfileId - * @property {Uint8Array|null} [rowKey] CheckAndMutateRowRequest rowKey - * @property {google.bigtable.v2.IRowFilter|null} [predicateFilter] CheckAndMutateRowRequest predicateFilter - * @property {Array.|null} [trueMutations] CheckAndMutateRowRequest trueMutations - * @property {Array.|null} [falseMutations] CheckAndMutateRowRequest falseMutations + * @interface IRateLimitInfo + * @property {google.protobuf.IDuration|null} [period] RateLimitInfo period + * @property {number|null} [factor] RateLimitInfo factor */ /** - * Constructs a new CheckAndMutateRowRequest. + * Constructs a new RateLimitInfo. * @memberof google.bigtable.v2 - * @classdesc Represents a CheckAndMutateRowRequest. - * @implements ICheckAndMutateRowRequest + * @classdesc Represents a RateLimitInfo. + * @implements IRateLimitInfo * @constructor - * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set */ - function CheckAndMutateRowRequest(properties) { - this.trueMutations = []; - this.falseMutations = []; + function RateLimitInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27587,96 +27865,334 @@ } /** - * CheckAndMutateRowRequest tableName. - * @member {string} tableName - * @memberof google.bigtable.v2.CheckAndMutateRowRequest - * @instance - */ - CheckAndMutateRowRequest.prototype.tableName = ""; - - /** - * CheckAndMutateRowRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.v2.CheckAndMutateRowRequest - * @instance - */ - CheckAndMutateRowRequest.prototype.appProfileId = ""; - - /** - * CheckAndMutateRowRequest rowKey. - * @member {Uint8Array} rowKey - * @memberof google.bigtable.v2.CheckAndMutateRowRequest - * @instance - */ - CheckAndMutateRowRequest.prototype.rowKey = $util.newBuffer([]); - - /** - * CheckAndMutateRowRequest predicateFilter. - * @member {google.bigtable.v2.IRowFilter|null|undefined} predicateFilter - * @memberof google.bigtable.v2.CheckAndMutateRowRequest - * @instance - */ - CheckAndMutateRowRequest.prototype.predicateFilter = null; - - /** - * CheckAndMutateRowRequest trueMutations. - * @member {Array.} trueMutations - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * RateLimitInfo period. + * @member {google.protobuf.IDuration|null|undefined} period + * @memberof google.bigtable.v2.RateLimitInfo * @instance */ - CheckAndMutateRowRequest.prototype.trueMutations = $util.emptyArray; + RateLimitInfo.prototype.period = null; /** - * CheckAndMutateRowRequest falseMutations. - * @member {Array.} falseMutations - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * RateLimitInfo factor. + * @member {number} factor + * @memberof google.bigtable.v2.RateLimitInfo * @instance */ - CheckAndMutateRowRequest.prototype.falseMutations = $util.emptyArray; + RateLimitInfo.prototype.factor = 0; /** - * Creates a new CheckAndMutateRowRequest instance using the specified properties. + * Creates a new RateLimitInfo instance using the specified properties. * @function create - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set - * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest instance + * @param {google.bigtable.v2.IRateLimitInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo instance */ - CheckAndMutateRowRequest.create = function create(properties) { - return new CheckAndMutateRowRequest(properties); + RateLimitInfo.create = function create(properties) { + return new RateLimitInfo(properties); }; /** - * Encodes the specified CheckAndMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * Encodes the specified RateLimitInfo message. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. * @function encode - * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @memberof google.bigtable.v2.RateLimitInfo * @static - * @param {google.bigtable.v2.ICheckAndMutateRowRequest} message CheckAndMutateRowRequest message or plain object to encode + * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CheckAndMutateRowRequest.encode = function encode(message, writer) { + RateLimitInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); - if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); - if (message.trueMutations != null && message.trueMutations.length) - for (var i = 0; i < message.trueMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.falseMutations != null && message.falseMutations.length) - for (var i = 0; i < message.falseMutations.length; ++i) - $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) - $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.factor != null && Object.hasOwnProperty.call(message, "factor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.factor); return writer; }; /** - * Encodes the specified CheckAndMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * Encodes the specified RateLimitInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.RateLimitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {google.bigtable.v2.IRateLimitInfo} message RateLimitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RateLimitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RateLimitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.RateLimitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.factor = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RateLimitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RateLimitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RateLimitInfo message. + * @function verify + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RateLimitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.period != null && message.hasOwnProperty("period")) { + var error = $root.google.protobuf.Duration.verify(message.period); + if (error) + return "period." + error; + } + if (message.factor != null && message.hasOwnProperty("factor")) + if (typeof message.factor !== "number") + return "factor: number expected"; + return null; + }; + + /** + * Creates a RateLimitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.RateLimitInfo} RateLimitInfo + */ + RateLimitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.RateLimitInfo) + return object; + var message = new $root.google.bigtable.v2.RateLimitInfo(); + if (object.period != null) { + if (typeof object.period !== "object") + throw TypeError(".google.bigtable.v2.RateLimitInfo.period: object expected"); + message.period = $root.google.protobuf.Duration.fromObject(object.period); + } + if (object.factor != null) + message.factor = Number(object.factor); + return message; + }; + + /** + * Creates a plain object from a RateLimitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {google.bigtable.v2.RateLimitInfo} message RateLimitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RateLimitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.period = null; + object.factor = 0; + } + if (message.period != null && message.hasOwnProperty("period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options); + if (message.factor != null && message.hasOwnProperty("factor")) + object.factor = options.json && !isFinite(message.factor) ? String(message.factor) : message.factor; + return object; + }; + + /** + * Converts this RateLimitInfo to JSON. + * @function toJSON + * @memberof google.bigtable.v2.RateLimitInfo + * @instance + * @returns {Object.} JSON object + */ + RateLimitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RateLimitInfo + * @function getTypeUrl + * @memberof google.bigtable.v2.RateLimitInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RateLimitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.RateLimitInfo"; + }; + + return RateLimitInfo; + })(); + + v2.CheckAndMutateRowRequest = (function() { + + /** + * Properties of a CheckAndMutateRowRequest. + * @memberof google.bigtable.v2 + * @interface ICheckAndMutateRowRequest + * @property {string|null} [tableName] CheckAndMutateRowRequest tableName + * @property {string|null} [appProfileId] CheckAndMutateRowRequest appProfileId + * @property {Uint8Array|null} [rowKey] CheckAndMutateRowRequest rowKey + * @property {google.bigtable.v2.IRowFilter|null} [predicateFilter] CheckAndMutateRowRequest predicateFilter + * @property {Array.|null} [trueMutations] CheckAndMutateRowRequest trueMutations + * @property {Array.|null} [falseMutations] CheckAndMutateRowRequest falseMutations + */ + + /** + * Constructs a new CheckAndMutateRowRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a CheckAndMutateRowRequest. + * @implements ICheckAndMutateRowRequest + * @constructor + * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set + */ + function CheckAndMutateRowRequest(properties) { + this.trueMutations = []; + this.falseMutations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckAndMutateRowRequest tableName. + * @member {string} tableName + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.tableName = ""; + + /** + * CheckAndMutateRowRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.appProfileId = ""; + + /** + * CheckAndMutateRowRequest rowKey. + * @member {Uint8Array} rowKey + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.rowKey = $util.newBuffer([]); + + /** + * CheckAndMutateRowRequest predicateFilter. + * @member {google.bigtable.v2.IRowFilter|null|undefined} predicateFilter + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.predicateFilter = null; + + /** + * CheckAndMutateRowRequest trueMutations. + * @member {Array.} trueMutations + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.trueMutations = $util.emptyArray; + + /** + * CheckAndMutateRowRequest falseMutations. + * @member {Array.} falseMutations + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.falseMutations = $util.emptyArray; + + /** + * Creates a new CheckAndMutateRowRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {google.bigtable.v2.ICheckAndMutateRowRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.CheckAndMutateRowRequest} CheckAndMutateRowRequest instance + */ + CheckAndMutateRowRequest.create = function create(properties) { + return new CheckAndMutateRowRequest(properties); + }; + + /** + * Encodes the specified CheckAndMutateRowRequest message. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @static + * @param {google.bigtable.v2.ICheckAndMutateRowRequest} message CheckAndMutateRowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckAndMutateRowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); + if (message.rowKey != null && Object.hasOwnProperty.call(message, "rowKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rowKey); + if (message.trueMutations != null && message.trueMutations.length) + for (var i = 0; i < message.trueMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.trueMutations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.falseMutations != null && message.falseMutations.length) + for (var i = 0; i < message.falseMutations.length; ++i) + $root.google.bigtable.v2.Mutation.encode(message.falseMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.predicateFilter != null && Object.hasOwnProperty.call(message, "predicateFilter")) + $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + return writer; + }; + + /** + * Encodes the specified CheckAndMutateRowRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.CheckAndMutateRowRequest.verify|verify} messages. * @function encodeDelimited * @memberof google.bigtable.v2.CheckAndMutateRowRequest * @static @@ -39023,25 +39539,24 @@ return RequestStats; })(); - v2.ResponseParams = (function() { + v2.FeatureFlags = (function() { /** - * Properties of a ResponseParams. + * Properties of a FeatureFlags. * @memberof google.bigtable.v2 - * @interface IResponseParams - * @property {string|null} [zoneId] ResponseParams zoneId - * @property {string|null} [clusterId] ResponseParams clusterId + * @interface IFeatureFlags + * @property {boolean|null} [mutateRowsRateLimit] FeatureFlags mutateRowsRateLimit */ /** - * Constructs a new ResponseParams. + * Constructs a new FeatureFlags. * @memberof google.bigtable.v2 - * @classdesc Represents a ResponseParams. - * @implements IResponseParams + * @classdesc Represents a FeatureFlags. + * @implements IFeatureFlags * @constructor - * @param {google.bigtable.v2.IResponseParams=} [properties] Properties to set + * @param {google.bigtable.v2.IFeatureFlags=} [properties] Properties to set */ - function ResponseParams(properties) { + function FeatureFlags(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39049,30 +39564,234 @@ } /** - * ResponseParams zoneId. - * @member {string|null|undefined} zoneId - * @memberof google.bigtable.v2.ResponseParams + * FeatureFlags mutateRowsRateLimit. + * @member {boolean} mutateRowsRateLimit + * @memberof google.bigtable.v2.FeatureFlags * @instance */ - ResponseParams.prototype.zoneId = null; + FeatureFlags.prototype.mutateRowsRateLimit = false; /** - * ResponseParams clusterId. - * @member {string|null|undefined} clusterId - * @memberof google.bigtable.v2.ResponseParams - * @instance + * Creates a new FeatureFlags instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.IFeatureFlags=} [properties] Properties to set + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags instance */ - ResponseParams.prototype.clusterId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + FeatureFlags.create = function create(properties) { + return new FeatureFlags(properties); + }; /** - * ResponseParams _zoneId. - * @member {"zoneId"|undefined} _zoneId - * @memberof google.bigtable.v2.ResponseParams - * @instance - */ + * Encodes the specified FeatureFlags message. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.IFeatureFlags} message FeatureFlags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureFlags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mutateRowsRateLimit != null && Object.hasOwnProperty.call(message, "mutateRowsRateLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.mutateRowsRateLimit); + return writer; + }; + + /** + * Encodes the specified FeatureFlags message, length delimited. Does not implicitly {@link google.bigtable.v2.FeatureFlags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.IFeatureFlags} message FeatureFlags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureFlags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureFlags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.FeatureFlags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.mutateRowsRateLimit = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureFlags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureFlags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureFlags message. + * @function verify + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureFlags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + if (typeof message.mutateRowsRateLimit !== "boolean") + return "mutateRowsRateLimit: boolean expected"; + return null; + }; + + /** + * Creates a FeatureFlags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.FeatureFlags} FeatureFlags + */ + FeatureFlags.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.FeatureFlags) + return object; + var message = new $root.google.bigtable.v2.FeatureFlags(); + if (object.mutateRowsRateLimit != null) + message.mutateRowsRateLimit = Boolean(object.mutateRowsRateLimit); + return message; + }; + + /** + * Creates a plain object from a FeatureFlags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {google.bigtable.v2.FeatureFlags} message FeatureFlags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureFlags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mutateRowsRateLimit = false; + if (message.mutateRowsRateLimit != null && message.hasOwnProperty("mutateRowsRateLimit")) + object.mutateRowsRateLimit = message.mutateRowsRateLimit; + return object; + }; + + /** + * Converts this FeatureFlags to JSON. + * @function toJSON + * @memberof google.bigtable.v2.FeatureFlags + * @instance + * @returns {Object.} JSON object + */ + FeatureFlags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureFlags + * @function getTypeUrl + * @memberof google.bigtable.v2.FeatureFlags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureFlags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.FeatureFlags"; + }; + + return FeatureFlags; + })(); + + v2.ResponseParams = (function() { + + /** + * Properties of a ResponseParams. + * @memberof google.bigtable.v2 + * @interface IResponseParams + * @property {string|null} [zoneId] ResponseParams zoneId + * @property {string|null} [clusterId] ResponseParams clusterId + */ + + /** + * Constructs a new ResponseParams. + * @memberof google.bigtable.v2 + * @classdesc Represents a ResponseParams. + * @implements IResponseParams + * @constructor + * @param {google.bigtable.v2.IResponseParams=} [properties] Properties to set + */ + function ResponseParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseParams zoneId. + * @member {string|null|undefined} zoneId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.zoneId = null; + + /** + * ResponseParams clusterId. + * @member {string|null|undefined} clusterId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.clusterId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseParams _zoneId. + * @member {"zoneId"|undefined} _zoneId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ Object.defineProperty(ResponseParams.prototype, "_zoneId", { get: $util.oneOfGetter($oneOfFields = ["zoneId"]), set: $util.oneOfSetter($oneOfFields) @@ -40260,58 +40979,26 @@ return CustomHttpPattern; })(); - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); - - api.ResourceDescriptor = (function() { + api.CommonLanguageSettings = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a CommonLanguageSettings. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new CommonLanguageSettings. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function CommonLanguageSettings(properties) { + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40319,53 +41006,3694 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings * @instance */ - ResourceDescriptor.prototype.type = ""; + CommonLanguageSettings.prototype.referenceDocsUri = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + CommonLanguageSettings.prototype.destinations = $util.emptyArray; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance */ - ResourceDescriptor.prototype.nameField = ""; + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.prototype.history = 0; + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.prototype.plural = ""; + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.prototype.singular = ""; - + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + /** * ResourceDescriptor style. * @member {Array.} style @@ -46659,6 +50987,7 @@ * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor * @property {boolean|null} [deprecated] MessageOptions deprecated * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ @@ -46711,6 +51040,14 @@ */ MessageOptions.prototype.mapEntry = false; + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -46759,6 +51096,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -46814,6 +51153,10 @@ message.mapEntry = reader.bool(); break; } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -46871,6 +51214,9 @@ if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -46908,6 +51254,8 @@ message.deprecated = Boolean(object.deprecated); if (object.mapEntry != null) message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); @@ -46946,6 +51294,7 @@ object.noStandardDescriptorAccessor = false; object.deprecated = false; object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; object[".google.api.resource"] = null; } if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) @@ -46956,6 +51305,8 @@ object.deprecated = message.deprecated; if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -47008,6 +51359,9 @@ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {google.protobuf.FieldOptions.OptionTargetType|null} [target] FieldOptions target * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference @@ -47086,6 +51440,30 @@ */ FieldOptions.prototype.weak = false; + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions target. + * @member {google.protobuf.FieldOptions.OptionTargetType} target + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.target = 0; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -47148,6 +51526,12 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.target); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -47221,6 +51605,18 @@ message.weak = reader.bool(); break; } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 18: { + message.target = reader.int32(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -47310,6 +51706,34 @@ if (message.weak != null && message.hasOwnProperty("weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -47407,6 +51831,76 @@ message.deprecated = Boolean(object.deprecated); if (object.weak != null) message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_TYPE_UNKNOWN": + case 0: + message.target = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.target = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.target = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.target = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.target = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.target = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.target = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.target = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.target = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.target = 9; + break; + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -47495,6 +51989,9 @@ object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.target = options.enums === String ? "TARGET_TYPE_UNKNOWN" : 0; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -47511,6 +52008,12 @@ object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.target] === undefined ? message.target : $root.google.protobuf.FieldOptions.OptionTargetType[message.target] : message.target; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -47584,6 +52087,52 @@ return values; })(); + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + return FieldOptions; })(); @@ -47819,6 +52368,7 @@ * @interface IEnumOptions * @property {boolean|null} [allowAlias] EnumOptions allowAlias * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ @@ -47854,6 +52404,14 @@ */ EnumOptions.prototype.deprecated = false; + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -47890,6 +52448,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -47935,6 +52495,10 @@ message.deprecated = reader.bool(); break; } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -47982,6 +52546,9 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -48010,6 +52577,8 @@ message.allowAlias = Boolean(object.allowAlias); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); @@ -48041,11 +52610,14 @@ if (options.defaults) { object.allowAlias = false; object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; } if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -50858,7 +55430,248 @@ return Annotation; })(); - return GeneratedCodeInfo; + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; })(); protobuf.Timestamp = (function() { @@ -51557,247 +56370,6 @@ return Any; })(); - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - protobuf.Empty = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index 71a826e24..538218165 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -2489,6 +2489,14 @@ } } }, + "ChangeStreamConfig": { + "fields": { + "retentionPeriod": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, "Table": { "options": { "(google.api.resource).type": "bigtableadmin.googleapis.com/Table", @@ -2526,6 +2534,10 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "changeStreamConfig": { + "type": "ChangeStreamConfig", + "id": 8 + }, "deletionProtection": { "type": "bool", "id": 9 @@ -3381,11 +3393,25 @@ } }, "MutateRowsResponse": { + "oneofs": { + "_rateLimitInfo": { + "oneof": [ + "rateLimitInfo" + ] + } + }, "fields": { "entries": { "rule": "repeated", "type": "Entry", "id": 1 + }, + "rateLimitInfo": { + "type": "RateLimitInfo", + "id": 3, + "options": { + "proto3_optional": true + } } }, "nested": { @@ -3403,6 +3429,18 @@ } } }, + "RateLimitInfo": { + "fields": { + "period": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "factor": { + "type": "double", + "id": 2 + } + } + }, "CheckAndMutateRowRequest": { "fields": { "tableName": { @@ -4232,6 +4270,14 @@ } } }, + "FeatureFlags": { + "fields": { + "mutateRowsRateLimit": { + "type": "bool", + "id": 3 + } + } + }, "ResponseParams": { "oneofs": { "_zoneId": { @@ -4379,6 +4425,248 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -5054,6 +5342,13 @@ "type": "bool", "id": 7 }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -5137,6 +5432,21 @@ "default": false } }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "target": { + "type": "OptionTargetType", + "id": 18 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -5169,6 +5479,27 @@ "JS_STRING": 1, "JS_NUMBER": 2 } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } } } }, @@ -5200,6 +5531,13 @@ "default": false } }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -5433,6 +5771,18 @@ } } }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Timestamp": { "fields": { "seconds": { @@ -5466,18 +5816,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Empty": { "fields": {} }, diff --git a/samples/generated/v2/bigtable.read_rows.js b/samples/generated/v2/bigtable.read_rows.js index d0a5ee790..f2c3fe428 100644 --- a/samples/generated/v2/bigtable.read_rows.js +++ b/samples/generated/v2/bigtable.read_rows.js @@ -39,8 +39,8 @@ function main(tableName) { */ // const tableName = 'abc123' /** - * This value specifies routing for replication. This API only accepts the - * empty value of app_profile_id. + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. */ // const appProfileId = 'abc123' /** diff --git a/samples/generated/v2/bigtable_table_admin.update_table.js b/samples/generated/v2/bigtable_table_admin.update_table.js index 8431e6d93..add98fbc3 100644 --- a/samples/generated/v2/bigtable_table_admin.update_table.js +++ b/samples/generated/v2/bigtable_table_admin.update_table.js @@ -35,11 +35,13 @@ function main(table, updateMask) { // const table = {} /** * Required. The list of fields to update. - * A mask specifying which fields (e.g. `deletion_protection`) in the `table` + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` * field should be updated. This mask is relative to the `table` field, not to * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following field: - * * `deletion_protection` + * Currently UpdateTable is only supported for the following fields: + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. */ diff --git a/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json b/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json index 01074f6d9..8eaff6e5b 100644 --- a/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json +++ b/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json @@ -1206,7 +1206,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 69, "type": "FULL" } ], diff --git a/samples/package.json b/samples/package.json index 8292fcfff..a34f2bb8d 100644 --- a/samples/package.json +++ b/samples/package.json @@ -11,10 +11,10 @@ "api-reference-doc-snippets/*.js" ], "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "dependencies": { - "@google-cloud/bigtable": "^4.5.2", + "@google-cloud/bigtable": "^5.0.0", "uuid": "^9.0.0", "yargs": "^16.0.0" }, @@ -30,4 +30,4 @@ "test": "mocha --timeout=600000", "test:snap": "SNAPSHOT_UPDATE=1 npm test" } -} +} \ No newline at end of file diff --git a/src/app-profile.ts b/src/app-profile.ts index da30cd7ee..9514769e2 100644 --- a/src/app-profile.ts +++ b/src/app-profile.ts @@ -72,7 +72,7 @@ export type CreateAppProfileCallback = ( ) => void; export type CreateAppProfileResponse = [ AppProfile, - google.bigtable.admin.v2.IAppProfile + google.bigtable.admin.v2.IAppProfile, ]; export type DeleteAppProfileCallback = ( err: ServiceError | null, @@ -91,7 +91,7 @@ export type GetAppProfileMetadataCallback = ( ) => void; export type GetAppProfileMetadataResponse = [ google.bigtable.admin.v2.IAppProfile, - google.bigtable.admin.v2.IAppProfile + google.bigtable.admin.v2.IAppProfile, ]; export type GetAppProfileCallback = ( err: ServiceError | null, @@ -100,7 +100,7 @@ export type GetAppProfileCallback = ( ) => void; export type GetAppProfileResponse = [ AppProfile, - google.bigtable.admin.v2.IAppProfile + google.bigtable.admin.v2.IAppProfile, ]; export type GetAppProfilesCallback = ( err: ServiceError | null, @@ -109,7 +109,7 @@ export type GetAppProfilesCallback = ( ) => void; export type GetAppProfilesResponse = [ AppProfile[], - google.bigtable.admin.v2.IAppProfile[] + google.bigtable.admin.v2.IAppProfile[], ]; export type SetAppProfileMetadataCallback = ( err: ServiceError | null, diff --git a/src/backup.ts b/src/backup.ts index 5ceaeb343..464040bda 100644 --- a/src/backup.ts +++ b/src/backup.ts @@ -133,7 +133,7 @@ export interface GetBackupsOptions { export type GetBackupsResponse = [ Backup[], GetBackupsOptions, - google.bigtable.admin.v2.IListBackupsResponse + google.bigtable.admin.v2.IListBackupsResponse, ]; export type GetBackupsCallback = ( err: ServiceError | null, diff --git a/src/chunktransformer.ts b/src/chunktransformer.ts index 986ceaf6f..4aec3d9ba 100644 --- a/src/chunktransformer.ts +++ b/src/chunktransformer.ts @@ -129,10 +129,10 @@ export class ChunkTransformer extends Transform { * @public * * @param {object} data readrows response containing array of chunks. - * @param {object} [enc] encoding options. + * @param {object} [_encoding] encoding options. * @param {callback} next callback will be called once data is processed, with error if any error in processing */ - _transform(data: Data, enc: string, next: Function): void { + _transform(data: Data, _encoding: string, next: Function): void { for (const chunk of data.chunks!) { switch (this.state) { case RowStateEnum.NEW_ROW: @@ -148,6 +148,7 @@ export class ChunkTransformer extends Transform { break; } if (this._destroyed) { + next(); return; } } @@ -226,7 +227,16 @@ export class ChunkTransformer extends Transform { chunk.familyName || chunk.qualifier || (chunk.value && chunk.value.length !== 0) || - chunk.timestampMicros! > 0; + // timestampMicros is an int64 in the protobuf definition, + // which can be either a number or an instance of Long. + // If it's a number... + (typeof chunk.timestampMicros === 'number' && + chunk.timestampMicros! > 0) || + // If it's an instance of Long... + (typeof chunk.timestampMicros === 'object' && + 'compare' in chunk.timestampMicros && + typeof chunk.timestampMicros.compare === 'function' && + chunk.timestampMicros.compare(0) === 1); if (chunk.resetRow && containsData) { this.destroy( new TransformError({ diff --git a/src/index.ts b/src/index.ts index 80bc710d5..dc4143c99 100644 --- a/src/index.ts +++ b/src/index.ts @@ -58,7 +58,7 @@ export interface GetInstancesCallback { export type GetInstancesResponse = [ Instance[], string[], - google.bigtable.admin.v2.IListInstancesResponse + google.bigtable.admin.v2.IListInstancesResponse, ]; export type RequestCallback = (err: ServiceError | null, resp?: T) => void; @@ -596,43 +596,47 @@ export class Bigtable { reqOpts.instance!.type = Instance.getTypeType_(options.type); } - reqOpts.clusters = arrify(options.clusters).reduce((clusters, cluster) => { - if (!cluster.id) { - throw new Error( - 'A cluster was provided without an `id` property defined.' - ); - } + reqOpts.clusters = arrify(options.clusters).reduce( + (clusters, cluster) => { + if (!cluster.id) { + throw new Error( + 'A cluster was provided without an `id` property defined.' + ); + } - if ( - typeof cluster.key !== 'undefined' && - typeof cluster.encryption !== 'undefined' - ) { - throw new Error( - 'A cluster was provided with both `encryption` and `key` defined.' - ); - } - ClusterUtils.validateClusterMetadata(cluster); - clusters[cluster.id!] = ClusterUtils.getClusterBaseConfigWithFullLocation( - cluster, - this.projectId, - undefined - ); - Object.assign(clusters[cluster.id!], { - defaultStorageType: Cluster.getStorageType_(cluster.storage!), - }); + if ( + typeof cluster.key !== 'undefined' && + typeof cluster.encryption !== 'undefined' + ) { + throw new Error( + 'A cluster was provided with both `encryption` and `key` defined.' + ); + } + ClusterUtils.validateClusterMetadata(cluster); + clusters[cluster.id!] = + ClusterUtils.getClusterBaseConfigWithFullLocation( + cluster, + this.projectId, + undefined + ); + Object.assign(clusters[cluster.id!], { + defaultStorageType: Cluster.getStorageType_(cluster.storage!), + }); - if (cluster.key) { - clusters[cluster.id!].encryptionConfig = { - kmsKeyName: cluster.key, - }; - } + if (cluster.key) { + clusters[cluster.id!].encryptionConfig = { + kmsKeyName: cluster.key, + }; + } - if (cluster.encryption) { - clusters[cluster.id!].encryptionConfig = cluster.encryption; - } + if (cluster.encryption) { + clusters[cluster.id!].encryptionConfig = cluster.encryption; + } - return clusters; - }, {} as {[index: string]: google.bigtable.admin.v2.ICluster}); + return clusters; + }, + {} as {[index: string]: google.bigtable.admin.v2.ICluster} + ); this.request( { diff --git a/src/row.ts b/src/row.ts index 82361dad3..457f1c92c 100644 --- a/src/row.ts +++ b/src/row.ts @@ -87,7 +87,7 @@ export type CreateRulesCallback = ( apiResponse?: google.bigtable.v2.IReadModifyWriteRowResponse ) => void; export type CreateRulesResponse = [ - google.bigtable.v2.IReadModifyWriteRowResponse + google.bigtable.v2.IReadModifyWriteRowResponse, ]; export type CreateRowCallback = ( err: ServiceError | PartialFailureError | null, @@ -113,7 +113,7 @@ export type FilterCallback = ( ) => void; export type FilterResponse = [ boolean | null, - google.bigtable.v2.ICheckAndMutateRowResponse + google.bigtable.v2.ICheckAndMutateRowResponse, ]; export type IncrementCallback = ( err: ServiceError | null, @@ -122,7 +122,7 @@ export type IncrementCallback = ( ) => void; export type IncrementResponse = [ number | null, - google.bigtable.v2.IReadModifyWriteRowResponse + google.bigtable.v2.IReadModifyWriteRowResponse, ]; /** diff --git a/src/table.ts b/src/table.ts index bb94470af..fa50f2f11 100644 --- a/src/table.ts +++ b/src/table.ts @@ -353,7 +353,7 @@ export type GetReplicationStatesCallback = ( ) => void; export type GetReplicationStatesResponse = [ Map, - google.bigtable.admin.v2.ITable + google.bigtable.admin.v2.ITable, ]; export type GetRowsCallback = ( err: ServiceError | null, @@ -745,22 +745,52 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); filter = Filter.parse(options.filter); } - const userStream = new PassThrough({objectMode: true}); - const end = userStream.end.bind(userStream); - userStream.end = () => { + let chunkTransformer: ChunkTransformer; + let rowStream: Duplex; + + let userCanceled = false; + const userStream = new PassThrough({ + objectMode: true, + readableHighWaterMark: 0, + transform(row, _encoding, callback) { + if (userCanceled) { + callback(); + return; + } + callback(null, row); + }, + }); + + // The caller should be able to call userStream.end() to stop receiving + // more rows and cancel the stream prematurely. But also, the 'end' event + // will be emitted if the stream ended normally. To tell these two + // situations apart, we'll save the "original" end() function, and + // will call it on rowStream.on('end'). + const originalEnd = userStream.end.bind(userStream); + + // Taking care of this extra listener when piping and unpiping userStream: + const rowStreamPipe = (rowStream: Duplex, userStream: PassThrough) => { + rowStream.pipe(userStream, {end: false}); + rowStream.on('end', originalEnd); + }; + const rowStreamUnpipe = (rowStream: Duplex, userStream: PassThrough) => { rowStream?.unpipe(userStream); + rowStream?.removeListener('end', originalEnd); + }; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + userStream.end = (chunk?: any, encoding?: any, cb?: () => void) => { + rowStreamUnpipe(rowStream, userStream); + userCanceled = true; if (activeRequestStream) { activeRequestStream.abort(); } if (retryTimer) { clearTimeout(retryTimer); } - return end(); + return originalEnd(chunk, encoding, cb); }; - let chunkTransformer: ChunkTransformer; - let rowStream: Duplex; - const makeNewRequest = () => { // Avoid cancelling an expired timer if user // cancelled the stream in the middle of a retry @@ -882,7 +912,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); const toRowStream = new Transform({ transform: (rowData, _, next) => { if ( - chunkTransformer._destroyed || + userCanceled || // eslint-disable-next-line @typescript-eslint/no-explicit-any (userStream as any)._writableState.ended ) { @@ -913,7 +943,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); rowStream .on('error', (error: ServiceError) => { - rowStream.unpipe(userStream); + rowStreamUnpipe(rowStream, userStream); activeRequestStream = null; if (IGNORED_STATUS_CODES.has(error.code)) { // We ignore the `cancelled` "error", since we are the ones who cause @@ -947,7 +977,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); .on('end', () => { activeRequestStream = null; }); - rowStream.pipe(userStream); + rowStreamPipe(rowStream, userStream); }; makeNewRequest(); @@ -1901,9 +1931,12 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); } // set timeout for 10 minutes - const timeoutAfterTenMinutes = setTimeout(() => { - callback!(null, false); - }, 10 * 60 * 1000); + const timeoutAfterTenMinutes = setTimeout( + () => { + callback!(null, false); + }, + 10 * 60 * 1000 + ); // method checks if retrial is required & init retrial with 5 sec // delay diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index 9289276b1..891971827 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -405,7 +405,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | undefined, - {} | undefined + {} | undefined, ] >; mutateRow( @@ -443,7 +443,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -536,7 +536,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, - {} | undefined + {} | undefined, ] >; checkAndMutateRow( @@ -576,7 +576,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -650,7 +650,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IPingAndWarmResponse, protos.google.bigtable.v2.IPingAndWarmRequest | undefined, - {} | undefined + {} | undefined, ] >; pingAndWarm( @@ -688,7 +688,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IPingAndWarmResponse, protos.google.bigtable.v2.IPingAndWarmRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -770,7 +770,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, - {} | undefined + {} | undefined, ] >; readModifyWriteRow( @@ -810,7 +810,7 @@ export class BigtableClient { [ protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -871,8 +871,8 @@ export class BigtableClient { * Values are of the form * `projects//instances//tables/`. * @param {string} request.appProfileId - * This value specifies routing for replication. This API only accepts the - * empty value of app_profile_id. + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. * @param {google.bigtable.v2.RowSet} request.rows * The row keys and/or ranges to read sequentially. If not specified, reads * from all rows. diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index ae6e86caf..53bd3ec0b 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -520,7 +520,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, - {} | undefined + {} | undefined, ] >; getInstance( @@ -560,7 +560,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -608,7 +608,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, - {} | undefined + {} | undefined, ] >; listInstances( @@ -648,7 +648,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -723,7 +723,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | undefined, - {} | undefined + {} | undefined, ] >; updateInstance( @@ -761,7 +761,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -807,7 +807,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteInstance( @@ -847,7 +847,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -893,7 +893,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, - {} | undefined + {} | undefined, ] >; getCluster( @@ -931,7 +931,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -981,7 +981,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | undefined, - {} | undefined + {} | undefined, ] >; listClusters( @@ -1021,7 +1021,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1067,7 +1067,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteCluster( @@ -1107,7 +1107,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1163,7 +1163,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] >; createAppProfile( @@ -1209,7 +1209,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.ICreateAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1255,7 +1255,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] >; getAppProfile( @@ -1295,7 +1295,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1343,7 +1343,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteAppProfile( @@ -1389,7 +1389,7 @@ export class BigtableInstanceAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteAppProfileRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1439,7 +1439,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] >; getIamPolicy( @@ -1477,7 +1477,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1535,7 +1535,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] >; setIamPolicy( @@ -1573,7 +1573,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1624,7 +1624,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + {} | undefined, ] >; testIamPermissions( @@ -1662,7 +1662,7 @@ export class BigtableInstanceAdminClient { [ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1733,7 +1733,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.ICreateInstanceMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createInstance( @@ -1786,7 +1786,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.ICreateInstanceMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1875,7 +1875,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateInstanceMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; partialUpdateInstance( @@ -1928,7 +1928,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateInstanceMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2028,7 +2028,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.ICreateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createCluster( @@ -2081,7 +2081,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.ICreateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2188,7 +2188,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; updateCluster( @@ -2241,7 +2241,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2340,7 +2340,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; partialUpdateCluster( @@ -2393,7 +2393,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2483,7 +2483,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; updateAppProfile( @@ -2536,7 +2536,7 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.IUpdateAppProfileMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2635,7 +2635,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile[], protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, - protos.google.bigtable.admin.v2.IListAppProfilesResponse + protos.google.bigtable.admin.v2.IListAppProfilesResponse, ] >; listAppProfiles( @@ -2681,7 +2681,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IAppProfile[], protos.google.bigtable.admin.v2.IListAppProfilesRequest | null, - protos.google.bigtable.admin.v2.IListAppProfilesResponse + protos.google.bigtable.admin.v2.IListAppProfilesResponse, ] > | void { request = request || {}; @@ -2868,7 +2868,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IHotTablet[], protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, - protos.google.bigtable.admin.v2.IListHotTabletsResponse + protos.google.bigtable.admin.v2.IListHotTabletsResponse, ] >; listHotTablets( @@ -2914,7 +2914,7 @@ export class BigtableInstanceAdminClient { [ protos.google.bigtable.admin.v2.IHotTablet[], protos.google.bigtable.admin.v2.IListHotTabletsRequest | null, - protos.google.bigtable.admin.v2.IListHotTabletsResponse + protos.google.bigtable.admin.v2.IListHotTabletsResponse, ] > | void { request = request || {}; diff --git a/src/v2/bigtable_proto_list.json b/src/v2/bigtable_proto_list.json index 866b08e57..c6f577144 100644 --- a/src/v2/bigtable_proto_list.json +++ b/src/v2/bigtable_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/bigtable/v2/bigtable.proto", "../../protos/google/bigtable/v2/data.proto", + "../../protos/google/bigtable/v2/feature_flags.proto", "../../protos/google/bigtable/v2/request_stats.proto", "../../protos/google/bigtable/v2/response_params.proto" ] diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index 7e86e21ae..7d43a4654 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -552,7 +552,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | undefined, - {} | undefined + {} | undefined, ] >; createTable( @@ -592,7 +592,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -642,7 +642,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | undefined, - {} | undefined + {} | undefined, ] >; getTable( @@ -680,7 +680,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -727,7 +727,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteTable( @@ -767,7 +767,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -822,7 +822,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | undefined, - {} | undefined + {} | undefined, ] >; modifyColumnFamilies( @@ -868,7 +868,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -922,7 +922,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, - {} | undefined + {} | undefined, ] >; dropRowRange( @@ -962,7 +962,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1015,7 +1015,7 @@ export class BigtableTableAdminClient { | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest | undefined ), - {} | undefined + {} | undefined, ] >; generateConsistencyToken( @@ -1064,7 +1064,7 @@ export class BigtableTableAdminClient { | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest | undefined ), - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1119,7 +1119,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, - {} | undefined + {} | undefined, ] >; checkConsistency( @@ -1165,7 +1165,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ICheckConsistencyResponse, protos.google.bigtable.admin.v2.ICheckConsistencyRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1218,7 +1218,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | undefined, - {} | undefined + {} | undefined, ] >; getSnapshot( @@ -1258,7 +1258,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1311,7 +1311,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteSnapshot( @@ -1351,7 +1351,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1398,7 +1398,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | undefined, - {} | undefined + {} | undefined, ] >; getBackup( @@ -1436,7 +1436,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1490,7 +1490,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | undefined, - {} | undefined + {} | undefined, ] >; updateBackup( @@ -1530,7 +1530,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1577,7 +1577,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, - {} | undefined + {} | undefined, ] >; deleteBackup( @@ -1617,7 +1617,7 @@ export class BigtableTableAdminClient { [ protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1668,7 +1668,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] >; getIamPolicy( @@ -1706,7 +1706,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1764,7 +1764,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] >; setIamPolicy( @@ -1802,7 +1802,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1853,7 +1853,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + {} | undefined, ] >; testIamPermissions( @@ -1891,7 +1891,7 @@ export class BigtableTableAdminClient { [ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -1958,7 +1958,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createTableFromSnapshot( @@ -2011,7 +2011,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ICreateTableFromSnapshotMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2081,11 +2081,15 @@ export class BigtableTableAdminClient { * The table's `name` field is used to identify the table to update. * @param {google.protobuf.FieldMask} request.updateMask * Required. The list of fields to update. - * A mask specifying which fields (e.g. `deletion_protection`) in the `table` + * A mask specifying which fields (e.g. `change_stream_config`) in the `table` * field should be updated. This mask is relative to the `table` field, not to * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following field: - * * `deletion_protection` + * Currently UpdateTable is only supported for the following fields: + * + * * `change_stream_config` + * * `change_stream_config.retention_period` + * * `deletion_protection` + * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. * @param {object} [options] @@ -2110,7 +2114,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IUpdateTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; updateTable( @@ -2163,7 +2167,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IUpdateTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2250,7 +2254,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IUndeleteTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; undeleteTable( @@ -2303,7 +2307,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IUndeleteTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2413,7 +2417,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ISnapshotTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; snapshotTable( @@ -2466,7 +2470,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ISnapshotTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2569,7 +2573,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ICreateBackupMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; createBackup( @@ -2622,7 +2626,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.ICreateBackupMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2724,7 +2728,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IRestoreTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] >; restoreTable( @@ -2777,7 +2781,7 @@ export class BigtableTableAdminClient { protos.google.bigtable.admin.v2.IRestoreTableMetadata >, protos.google.longrunning.IOperation | undefined, - {} | undefined + {} | undefined, ] > | void { request = request || {}; @@ -2876,7 +2880,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable[], protos.google.bigtable.admin.v2.IListTablesRequest | null, - protos.google.bigtable.admin.v2.IListTablesResponse + protos.google.bigtable.admin.v2.IListTablesResponse, ] >; listTables( @@ -2916,7 +2920,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ITable[], protos.google.bigtable.admin.v2.IListTablesRequest | null, - protos.google.bigtable.admin.v2.IListTablesResponse + protos.google.bigtable.admin.v2.IListTablesResponse, ] > | void { request = request || {}; @@ -3094,7 +3098,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ISnapshot[], protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, - protos.google.bigtable.admin.v2.IListSnapshotsResponse + protos.google.bigtable.admin.v2.IListSnapshotsResponse, ] >; listSnapshots( @@ -3134,7 +3138,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.ISnapshot[], protos.google.bigtable.admin.v2.IListSnapshotsRequest | null, - protos.google.bigtable.admin.v2.IListSnapshotsResponse + protos.google.bigtable.admin.v2.IListSnapshotsResponse, ] > | void { request = request || {}; @@ -3349,7 +3353,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup[], protos.google.bigtable.admin.v2.IListBackupsRequest | null, - protos.google.bigtable.admin.v2.IListBackupsResponse + protos.google.bigtable.admin.v2.IListBackupsResponse, ] >; listBackups( @@ -3389,7 +3393,7 @@ export class BigtableTableAdminClient { [ protos.google.bigtable.admin.v2.IBackup[], protos.google.bigtable.admin.v2.IListBackupsRequest | null, - protos.google.bigtable.admin.v2.IListBackupsResponse + protos.google.bigtable.admin.v2.IListBackupsResponse, ] > | void { request = request || {}; diff --git a/system-test/bigtable.ts b/system-test/bigtable.ts index 33d7b817d..2df602a70 100644 --- a/system-test/bigtable.ts +++ b/system-test/bigtable.ts @@ -155,9 +155,8 @@ describe('Bigtable', () => { it('should test Iam permissions for the instance', async () => { const permissions = ['bigtable.tables.get', 'bigtable.tables.readRows']; - const [grantedPermissions] = await INSTANCE.testIamPermissions( - permissions - ); + const [grantedPermissions] = + await INSTANCE.testIamPermissions(permissions); assert.strictEqual(grantedPermissions.length, permissions.length); permissions.forEach(permission => { assert.strictEqual(grantedPermissions.includes(permission), true); diff --git a/test/chunktransformer.ts b/test/chunktransformer.ts index 4696d3765..d58a2d434 100644 --- a/test/chunktransformer.ts +++ b/test/chunktransformer.ts @@ -997,12 +997,6 @@ describe('Bigtable/ChunkTransformer', () => { const err = callback.getCall(0).args[0]; assert(!err, 'did not expect error'); }); - it('should return when stream is destroyed', () => { - chunkTransformer._destroyed = true; - const chunks = [{key: 'key'}]; - chunkTransformer._transform({chunks}, {}, callback); - assert(!callback.called, 'unexpected call to next'); - }); it('should change the `lastRowKey` value for `data.lastScannedRowKey`', () => { chunkTransformer._transform( {chunks: [], lastScannedRowKey: 'foo'}, diff --git a/test/readrows.ts b/test/readrows.ts index 3da2cb9cf..265125c34 100644 --- a/test/readrows.ts +++ b/test/readrows.ts @@ -22,6 +22,7 @@ import {MockServer} from '../src/util/mock-servers/mock-server'; import {BigtableClientMockService} from '../src/util/mock-servers/service-implementations/bigtable-client-mock-service'; import {MockService} from '../src/util/mock-servers/mock-service'; import {debugLog, readRowsImpl} from './utils/readRowsImpl'; +import {UntypedHandleCall} from '@grpc/grpc-js'; describe('Bigtable/ReadRows', () => { let server: MockServer; @@ -47,7 +48,7 @@ describe('Bigtable/ReadRows', () => { const keyTo = 1000; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo), + ReadRows: readRowsImpl(keyFrom, keyTo) as any, }); let receivedRowCount = 0; @@ -79,7 +80,7 @@ describe('Bigtable/ReadRows', () => { const keyTo = 1000; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo), + ReadRows: readRowsImpl(keyFrom, keyTo) as any, }); let receivedRowCount = 0; @@ -122,8 +123,7 @@ describe('Bigtable/ReadRows', () => { pipeline(readStream, transform, passThrough, () => {}); }); - // TODO(@alexander-fenster): enable after https://github.com/googleapis/nodejs-bigtable/issues/607 is fixed - it.skip('should create read stream and read asynchronously using Transform stream', function (done) { + it('should create read stream and read asynchronously using Transform stream', function (done) { if (process.platform === 'win32') { this.timeout(60000); // it runs much slower on Windows! } @@ -133,7 +133,7 @@ describe('Bigtable/ReadRows', () => { const keyTo = 1000; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo), + ReadRows: readRowsImpl(keyFrom, keyTo) as any, }); let receivedRowCount = 0; @@ -186,7 +186,7 @@ describe('Bigtable/ReadRows', () => { const stopAfter = 42; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo), + ReadRows: readRowsImpl(keyFrom, keyTo) as any, }); let receivedRowCount = 0; @@ -222,8 +222,8 @@ describe('Bigtable/ReadRows', () => { }); }); - // TODO(@alexander-fenster): enable after it's fixed - it.skip('should be able to stop reading from the read stream when reading asynchronously', function (done) { + // TODO: enable after https://github.com/googleapis/nodejs-bigtable/issues/1286 is fixed + it('should be able to stop reading from the read stream when reading asynchronously', function (done) { if (process.platform === 'win32') { this.timeout(60000); // it runs much slower on Windows! } @@ -235,7 +235,7 @@ describe('Bigtable/ReadRows', () => { const stopAfter = 420; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo), + ReadRows: readRowsImpl(keyFrom, keyTo) as any, }); let receivedRowCount = 0; @@ -252,6 +252,7 @@ describe('Bigtable/ReadRows', () => { // Transform stream const transform = new Transform({ objectMode: true, + writableHighWaterMark: 0, transform: (row, _encoding, callback) => { setTimeout(() => { callback(null, row); @@ -298,7 +299,7 @@ describe('Bigtable/ReadRows', () => { const errorAfterChunkNo = 423; service.setService({ - ReadRows: readRowsImpl(keyFrom, keyTo, errorAfterChunkNo), + ReadRows: readRowsImpl(keyFrom, keyTo, errorAfterChunkNo) as any, }); let receivedRowCount = 0;